Programming in C if 'c' is greater than 25 (c>25) then add two numbers If not then multiply these numbers.
Program:-
#include<stdio.h>
#include<conio.h>
void main()
{ int a,b,c,d;
clrscr();
printf("Enter the value for a :");
scanf("%d",&a);
printf("Enter the value for b :");
scanf("%d",&b);
c=a+b;
d=a*b;
if(c>25)
printf("Addition is %d",c);
else
printf("Multiplication is %d",d);
getch();
}
Comments
Post a Comment