Answer to Question #29391 in C++ for abdul rehman

Question #29391
programme that terminate at negative value by given input values using while loop
1
Expert's answer
2013-05-08T11:59:26-0400
#include <iostream.h>

void main() {
int i=1,input;
cout << "Enter a number
"
cin >> input;
while(input >= 0)
{
i++;
cout << "Enter anothernumber
";
cin >> input;
}
cout << "
You have entered "<< i << " numbers";
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS