+ 3
I want to print I love dsvv using if-else.in if part I love and else part dsvv. Is this possible?
By c language
9 Réponses
+ 3
For this you may use 2 if statements.
or a loop .
In a single if-else you can't execute if block & else block at the same time .
+ 3
Or loop
int a;
for(a=1;a<3;a++)
{
if(a==1)
printf("I love");
else
printf ("dsvv");
}
+ 2
? why not just print the whole thing in one statement?
+ 2
or a loop
for(int i=0;i<2;i++){
if(i%2==0)
printf("i love");
else
printf("bd");
}
+ 2
There's no point. It would have to be two seperate if-else statements. Thats the whole point of if-else statements.
its this OR that, NOT both
+ 2
Ye hai
+ 1
How?
+ 1
if(!printf("I love "))
{
Abc;
}
else
{
printf("dsvv");
}