program using multi condition and relational operator in same loop



QUESTION: -a program using multi-condition and relational operator in the same loop

#include <stdio.h>

#include <conio.h>

void main()

{

    int nooo;

    printf("enter a value a: ");

    scanf("%d", &no);

    printf("enter a value b: ");

    scanf("%d", &oo);

    for (int i = noj = 2i >= 1 && j <= ooi--, j++)

    // in the above condition we can also remove one condition, 
but program will execute with the help of another.

    // using relational operator(and) both the condition will 
run until both condition wont satisfied.

    {

        printf("%d \t"i);

        printf("%d \n"j);
    }

    getch();
}


OUTPUT
enter a value a: 10
enter a value b: 15
10      2 
9       3 
8       4 
7       5 
6       6 
5       7 
4       8 
3       9 
2       10
1       11
Follow our page for regular updates.

0 Comments