#include<iostream>
02 #include<cstdlib>
03 using namespace std;
04 void main ()
05 {
06 int x,y;
07 cout<<"insert 2 numbers please"<<endl;
08 cin>>x>>y;
09
10 do
11 {
12
13 cout<<x++<<") "<<rand()%25<<endl;
14 }
15
16 while (y!=x);
17
18 if(y<x)
19 cout<<"LOW"<<endl;
20 if(y>x)
21
22 cout<<"HIGH"<<endl;
23 else
24 cout<<"Congratulations"<<endl;
25
26
27 }
Write full documented C++ program that prompt the user to enter a number of three digits, then print “right” if the first digit is the largest number or print “middle” if the second digit is the largest number or print “left” if the third digit is the largest number or print “balanced” if there are two or three digits are equal. For example if the user enter 625 the output is “left”
the output is infinitve loop but i don't know where cxactly i was wronge.i couldn't notice where is the error exactly...sorry but i can't speak english very well so hope u understod what i mean

New Topic/Question
Reply



MultiQuote





|