void main(){
float a,b,ans;
clrscr();
printf("Enter the two number\n");
scanf("%f%f",&a,&b);
ans=a+b;
printf("\addition=%f",ans);
ans=a-b;
printf("\subtraction=%f",ans);
ans=a*b;
printf("\multiplication=%f",ans);
if(b!=0){
ans=a/b;
printf("\Division=%f",ans);
}
else printf("Divisor must be a non zero value\n");
getch();
}
float a,b,ans;
clrscr();
printf("Enter the two number\n");
scanf("%f%f",&a,&b);
ans=a+b;
printf("\addition=%f",ans);
ans=a-b;
printf("\subtraction=%f",ans);
ans=a*b;
printf("\multiplication=%f",ans);
if(b!=0){
ans=a/b;
printf("\Division=%f",ans);
}
else printf("Divisor must be a non zero value\n");
getch();
}
No comments:
Post a Comment