+ 9
how to make a loop in the c++ program
I was given the task of making a C ++ program using a loop. I didn't really understand loop
12 Answers
+ 10
Maybe use do-while
+ 9
make the command in c ++ to determine odd numbers using the loop function
+ 8
yes,I mean how the loop works
+ 7
What is output
+ 6
You mean
+ 3
But it's just a few lines of code
int x;
cin >> x;
if (x % 2 == 1)
cout << "Odd";
else
cout << "Even";
+ 2
You probably should use recursive functions
+ 2
If you input an odd number, it returns "Odd", if even, it returns "Even"
+ 2
loop is define as command which runs many times according to conditions
you can create loops in many ways, cpp provide you many type of commands which helps to create a loop according to yaar condition.
also you can create loop with the help of recursion
recursion is the method in which function calls itself.
0
That depends on what you want
0
what is your task
0
I can't see how would you need loops for that