Results 1 to 13 of 13
Thread: C++
Hybrid View
-
29th October 2012 15:39 #1
C++
. number. 5 . .
:
#include <iostream>
#include <windows.h>
#include <time.h>
using namespace std;
int main()
{
int number,guess,c;
srand(time(0));
number=1+rand()%10;
for(c=0;c<5;c++)
{
cout<<"Koe e chisloto (1..10)? (opit #"<<c+1<<"): ";
cin>>guess;
if(guess==number)
{
cout<<"Poznahte !"<<endl<<endl;
break;
}
else
if(c<4) cout<<"Opitayte pak !"<<endl<<endl;
}
if(guess!=number) cout<<"Sled 5 opita ne poznahte, che chisloto e: "<<number<<endl<<endl;
return 0;
}




-
29th October 2012 15:46 #2
, ?
, . .
"640K ught to be enough for anybody" - Bill Gates, 1981
::Machine specs::Fract::AGG::::Baileys::blog::YouTube channel
-
29th October 2012 15:55 #3Visual Studio 2012Warning 1 warning C4627: '#include <iostream>': skipped when looking for precompiled header use c:\users\bahko0o\documents\visual studio 2012\projects\app3\app3\app.xaml.cpp 1 1 App3
Warning 2 warning C4627: '#include <time.h>': skipped when looking for precompiled header use c:\users\bahko0o\documents\visual studio 2012\projects\app3\app3\app.xaml.cpp 3 1 App3
Error 3 error C1010: unexpected end of file while looking for precompiled header. Did you forget to add '#include "pch.h"' to your source? c:\users\bahko0o\documents\visual studio 2012\projects\app3\app3\app.xaml.cpp 31 1 App3




-
29th October 2012 16:05 #4
2006
laptop: Samsung NP300-V5Z-s02bg- intel core i3-2310M,8GB RAM,nVidia GT 520MX,HDD 640 GB
-
29th October 2012 16:05 #5
app3\app.xaml.cpp , c++ console application
: XaMaB; . 0.42
In God we Trust (all others must submit a X.509 certificate). , ()
-
29th October 2012 16:09 #6




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