Advertisement

A simple program for beginner:


Program
……………….
……………….
……………….
main()
{  clrscr();
float a, b, c, y, x, z;
a = 9;
b = 12;
c = 3;
x = a – b / 3 + c * 2 – 1;
y = a – b / (3 + c) * (2 – 1);
z = a – (b / (3 + c) * 2) – 1;
printf(“x = %f \n”,x);
printf(“y = %f \n”,y);
printf(“z = %f \n”,z);
}
OUTPUT
x = 10.000000
y = 7.000000
z = 4.000000.

May also visit : http://myitzn.blogspot.com/ for more tech and study materials


No comments:

Post a Comment

Please comment bellow. Share your knowledge