20.3k views
1 vote
The if/else if statement is actually a form of the __________ if statement.

User Capagris
by
5.9k points

1 Answer

4 votes

Answer:

The answer to this question is "nested".

Explanation:

The answer to this question is nested because, In programming languages, there is a concept of nested if-else statement. In nested if-else statement placing if statement inside another IF Statement that is known as nested If in C Programming.

Example of nested if can be given as

#include <stdio.h>

int main()

{

int a,b,c;

printf("Enter 3 number\\");

scanf("%d",&a);

scanf("%d",&b);

scanf("%d",&c);

if(a>b)

{

if(a>c)

{

printf("A is greater: %d",a);

}

}

else

{

if(b>c)

{

printf("B is greater: %d",b);

}

else

{

printf("C is greater: %d",c);

}

}

return 0;

}

output:

Enter 3 number

4

7

9

c is greater: 9

User Mike Allen
by
4.7k points