Quote:
Originally Posted by 143rocker
sorry for that reply....this is the real one
Code:#include <stdio.h> #include <conio.h> main() { float n1,n2,s,d,p,q; clrscr(); printf("\n Enter two nos"); scanf("%f%f"&n1,&n2); s=n1+n2 d=n1-n2; p=n1*n2; q=n1/n2; printf("\n Sum %f",s); printf("\n Difference %f",d); printf("\n Product %f",p); printf("\n Quotient %f",q); getch(); return(0); }
To give the program some readability:
Code:
#include <stdio.h>
#include <conio.h>
main()
{
float n1,n2,s,d,p,q;
printf("\n Enter two numbers: ");
scanf("%f %f", &n1, &n2);
s=n1+n2;
d=n1-n2;
p=n1*n2;
q=n1/n2;
printf("\n Sum %9.2f",s);
printf("\n Difference %9.2f",d);
printf("\n Product %9.2f",p);
printf("\n Quotient %9.2f",q);
getch();
return(0);
}

