0
Write in C ++ the while functionally equivalent to the following structure for: for (i = 1; i ≤ N; i ++)
Help
5 Antworten
0
int i=1;
int N=5;
while(i<=5)
{
cout<<i;
//add more if you need like above line
i++;
}
please go through your lesson ones.....
https://www.sololearn.com/learn/CPlusPlus/1614/
+ 1
Please, show us your code 😉
0
I don't know how to do it I don't quite understand how to do it and I'm in the beginning
0
at the beginning of the program, declare the variable " i " (counter) and assign it the value 1, then in the next line write the keyword "while". this was followed by the word in parentheses, write the execution condition of the cycle, which cycle will be repeated. on the next line, insert the opening curly brace, followed by the counter i give an increase of one. if necessary, add other necessary lines of code. at the end, close the braces. remember to end each line of code with a semicolon.
0
Thx