C POROGRAM - IF LADER
#include <stdio.h>
#include <stdlib.h>
int main()
{
int a,b,choice,result;
printf("enter two number \n");
scanf("%d%d",&a,&b);
printf("enter 1 multpication ,:\n enter 2 mines, :\n enter 3 subtraxtion:, \n enter 4 division\n");
scanf("%d",&choice);
if(choice==1){
result=a+b;
}
else if (choice==2)
{
result=a-b;
}
else if (choice==3){
result=a*b;
}
else if (choice==4){
result=a/b;
printf("result is :%d",result);
}
else
{
printf("fool");
}
return 0;
Comments
Post a Comment