If and else :
Example 3
//Write a c program to check whether a number is divisible by 5 and 11 using if and else.
For Syntax click here : syntax
C program code.....
#include<stdio.h>
int main()
{
int num;
printf("Enter a number ");
scanf("%d",&num);
if(num%5==0&num%11==0)
{
printf("the number divisible by 5 and 11",num);
}
else
{
printf(" the number is not divisible by 5 and 11",num);
}
}
For first example 1
https://kodewithgy.blogspot.com/2024/09/c-program-if-and-else-questions-and.html
Learning C programming language from basics concept include with PROGRAMS:
https://kodewithgy.blogspot.com/2024/09/learning-c-programming-language-from.html