#include <iostream>
#include <cmath>
#include <stdio.h>
using namespace std;


int main ()
{
    int n, x=0, ans;
    int  b=0;
    do
    {
      x++; 
        cout << "\nINPUT NUMBER: ";
        cin >> n;

        if(b<n)
        {
           b=n;    
           }

         }
      while (x<=10);

   cout << "\n";
   cout << "\nHIGHEST: " << b;
   system ("PAUSE");
  return 0;
}

the problem is when i run it; its okay! but after the eighth input it just stop! wont even reach 10! help tried goto, for, while, and do while! the same problem

When you say it just stops does it lock up or does it display the value of b?

It works fine on my end. What numbers are you typing? What compiler and OS? As Nathan asked, what does "it just stops" mean?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.