#include <iostream>
usingnamespace std;
int main(){
int i = 2;
int n = 18;
while (i < n)
{
if ((i % 2) == 0)
i++;
else
n--;
}
cout << i << endl;
cout << n << endl;
return 0;
}
Compile and run that, it's going to give you 3 and 3 for i and n. just copy and paste each snippet, not hard.
I pasted it and nothing shows up on my screen the program run perfectly but it exit the display black screen and show no answer. If it work in the first place i wouldn't have a problem in the first place. And no this is not an exam question it is a worksheet fyi mr. Browni3141. I use the Microsoft Visual Studio 2005 because i don't know y the teacher want that, newer version is so much better smh.
If it work in the first place i wouldn't have a problem in the first place
If you knew the basics of the language you wouldn't have to ask.
I know that sounds mean, but it's the truth. If you want to learn the basics you can read the tutorial here or find a different one, not too hard just takes time. Then when you want to learn the language a little more go out and find some books...
If this sounds mean I'm not trying to make it that way, I just want to be frank with you.
Also the above quote dosn't make a whole lot of grammatical sense.