blob: 3fa79957d508cc01f1cb66a838356a9ed27ee0ef (
plain)
1
2
3
4
5
6
7
8
9
10
|
// Example 4.5
//Reading of real numbers(in both decimal point and exponential notation
printf("Values of x and y:");
[x,y]=scanf("%f %e"); //reading x [decimal point] and y[exponential] from standard input
printf("\n");
printf("x = %f\ny = %f\n",x,y);
printf("Values of p and q:");
[p,q]=scanf("%lg %lg");
printf("\np = %.12f\nq = %.12e\n",p,q);
|