Results 1 to 13 of 13
Thread: C++
Hybrid View
-
5th June 2007 14:04 #1
C++
++ 40 - - . , .
#include <iostream>
int main()
{
int a[40],min,max;
for (i=0; i<=39; i++)
{
cout<<"Vavedete a["<<i<<"]=";
cin>>a[i];
}
int min=a[a^0];
if (min > a[i]);
min=a[i];
cout<< min;
int max=a[a^0];
if(max<a[i]);
max=a[i]
cout<<max;
}
-
5th June 2007 16:04 #2Code:
#include <iostream> int main() { int a[40],min,max; cout<<"Vavedete a[0]="; cin>>a[0]; min = max = a[0]; for (i=1; i<40; i++) { cout<<"Vavedete a["<<i<<"]="; cin>>a[i]; if (min > a[i]) min=a[i]; if(max<a[i]) max=a[i]; } cout<< "min: " << min; cout<< "max: " << max; }42;
-
5th June 2007 23:33 #3
, STL, ()
:Code:#include <iostream> #include <vector> #include <algorithm> int main() { std::vector<int> values; for (i=0; i<40; ++i) { std::cout<<std::endl<<"Molya vavedete a["<<i<<"]:"; int tmpVal = 0; std::cin>>tmpVal; values.push_back(tmpVal) } std::cout<< "min: " << std::min_element(values.begin(), values.end()); std::cout<< "max: " << std::max_element(values.begin(), values.end()); }
-
5th June 2007 23:57 #4
-
6th June 2007 00:15 #5, . .
"640K ught to be enough for anybody" - Bill Gates, 1981
::Machine specs::Fract::AGG::::Baileys::blog::YouTube channel
-
24th June 2007 17:50 #6
[QUOTE=anrieff;1190950] , , " , - copy/paste ".
Pesho -
[/QU
OTE]
,
-
24th June 2007 21:18 #7
Internet - it doesn't make you stupid, it just makes your stupidity more accessible to others
-
24th June 2007 21:36 #8
-
26th June 2007 18:11 #9
-
26th June 2007 20:39 #10
STL C++, - C++ . - ( ), , (vector), (priority_queue), (list), (map set). : (sort), (next_permutation), (random_shuffle), (binary_search). (string), (fstream, stringstream) . .
, // - .. , , ..
:
:
1.
2.
3. .
. , , :
1.1 1.20 , 44* 12' 15'' 45''' 48* 0' 15'' 38''' ... ... .
1.2 "" , . ( - )
2.1. , .... ... .
2.2. 480 ""
3..
, . .
"640K ught to be enough for anybody" - Bill Gates, 1981
::Machine specs::Fract::AGG::::Baileys::blog::YouTube channel
-
26th June 2007 20:43 #11
STL - Standard Template Library - C++. (, , , ..), / () (, ..)
- . , . - BASIC, Pascal C,
: , "", "", "", "", "", "" .. , , .Code:double _ ( v1, v2) : double i: integer i := 1 (v1) := + v1[i]*v2[i]
anrieff
Internet - it doesn't make you stupid, it just makes your stupidity more accessible to others
-
26th June 2007 23:31 #12, . .
"640K ught to be enough for anybody" - Bill Gates, 1981
::Machine specs::Fract::AGG::::Baileys::blog::YouTube channel
-
27th June 2007 11:56 #13




Reply With Quote


Lenovo ThinkPad 15 IdeaPad 15
5th May 2023, 22:16 in