Обсуждения
When I enter two numbers the sum is displayed.. but when I input character as yes not y... Then it goes into an infinite loop... can anyone explain why?
int a,b;
char ch;
do
{
cout<<"Enter two numbers: ";
cin>>a>>b;
cout<<"The sum is "<<a+b
<<"\nDo you want to try again (y/n): ";
cin>>ch;
}while(ch=='Y'||ch=='y');
0 голосов
4 ответовhonestly, i have never dealt with any prog language before...i'm 22(aged enough to be confused, huh!)...trust me guys, i'm trying to know where exactly should i start to, things seem to be tough and above my head...u can tell me which way u hav passed up to now..i'll appreciate, thanks( if u wanna ask me, welcome)
0 голосов
4 ответовАктуальное сегодня
HTML/CSS questions
0 Votes
Certificate Problem
0 Votes
Find courses
0 Votes
How to learn css and html
0 Votes
C pointers
1 Votes
what the hell is going on this lessons cause i cant undrstand anything on any of the lessons
0 Votes
About progress
0 Votes