Results 1 to 13 of 13

Thread: C++

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered User BaHko0o's Avatar
    Join Date: Sep:2007
    Location: In the middle of nowhere!
    Posts: 490

    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;
    }

  2. #2
    ɐ-əpoɔᴉu⋂ ɐ ə anrieff's Avatar
    Join Date: Apr:2004
    Location: Sofia
    Posts: 8,448
    , ?
    , . .
    "640K ught to be enough for anybody" - Bill Gates, 1981
    ::Machine specs::Fract::AGG::::Baileys::blog::YouTube channel

  3. #3
    Registered User BaHko0o's Avatar
    Join Date: Sep:2007
    Location: In the middle of nowhere!
    Posts: 490
    Warning 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
    Visual Studio 2012

  4. #4
    Registered User BoRkAtA90's Avatar
    Join Date: Jan:2012
    Location:
    Posts: 289
    2006
    laptop: Samsung NP300-V5Z-s02bg- intel core i3-2310M,8GB RAM,nVidia GT 520MX,HDD 640 GB

  5. #5
    XaMaB's Avatar
    Join Date: Nov:2001
    Location:
    Posts: 20,387
    app3\app.xaml.cpp , c++ console application
    : XaMaB; . 0.42

    In God we Trust (all others must submit a X.509 certificate). , ()

  6. #6
    Registered User BaHko0o's Avatar
    Join Date: Sep:2007
    Location: In the middle of nowhere!
    Posts: 490
    Click image for larger version. 

Name:	Без име.jpg 
Views:	165 
Size:	40.3 KB 
ID:	57228
    ?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

Copyright © 1999-2011 . .
iskamPC.com | mobility.BG | Bloody's Techblog | | 3D Vision Blog |