0
I am finding it hard to understand conditional loops in c++ can you assist please??
C++
4 Answers
+ 1
int a = 5;
if(a > 0)
{
std::cout<<"Greater than zero";
}
else
{
std::cout<<"Smaller than zero";
}
So the output would be Greater than zero because 5 is greater than 0.
+ 2
maf im my own teacher.. so im doing this thing for fun
+ 1
U have been ordered by your teacher to do homework, if you do you will get marks otherwise you will be punished.
So we use if else statements to tell our program to do this if this happens or do that if that happens.
+ 1
I learnt this myself too.