
-----------------------------------
rahzab
Sat Jul 26, 2008 1:53 pm

guess the number on C++
-----------------------------------
Alrite, I am a total beginner at programming C++.
I just started learning the language and it's been about one week.
I am just learning do loops and ifs, and im running into a problem
Whenever i execute my code, it runs every if statement.  Do i have to use a while loop?

If it's possible could someone tell me what's wrong with my code?

I use dev-C++ by bloodshed as my compiler

// Guess the number
// By: rahzab

#include 
#include 
#include 
#include 
using namespace std;

int main()
{
    //Variables
    int ans;
    int count = 0;
        
    cout 