hi how can I 10 positive number ,and when I put 1 a negative number to stop the program?
Last edited on
Use int as your datatype. Then after every input check if the input is < 0.
#include <iostream.h>
int main (void)
{
int = 0;
int num1,num2,num3;
cout << "enter a 3 numbers:;
cin >> num;
while (num < 0)
{
}
return(0);
}
this is true?
Last edited on