if(Condition) { statement 1 statement 2 .. .. }In the above syntax 'if' condition is true the statements of 'if' block is execute.'if' the condition is false program terminated.
if(Condition) { statement 1 statement 2 .. .. } else { statement 3 statement 4 .. .. }In the above syntax 'if' condition is true the statements of 'if' block is execute.'if' the condition is false the statements of 'else' block is execute.
#include <stdio.h> int main() { int x; printf("Enter x value"); scanf("%d",&x); if(x%2==0) { printf("Even is Nnumber"); } else { printf("Odd is Number"); } return 0; }
Enter x value 10
Even Number
Enter x value 11
Odd Number
Write a C-program to print ODD or Even Number using if else condition
Write a C-program to print max number using if else condition
Write a C-program to check the given number is valid or invalid(value must divisible by 2 and 3)
Write a C-program to check the given number is valid or invalid(value must between 20 and 30)
Write a C-program to check the given character is vowel or consonant
Write a C-program to check the given character is small letter or not
Write a C-program to check the given character is capital letter or not
Write a C-program to check the given character is number or not
Write a C-program to check the given character is symbol letter or not
Write a C-program to calculate simple interest with following conditions