Friday, August 29, 2014

Given a = 5, b = 1, x = 10, and y = 5, create a program that outputs the result of the formula f = (a b)(x y) using a single printf() function


Code

#include<stdio.h>
int main()
{
int a = 5,b = 1,x = 10,y = 5,f;

f = (a*b)*(x*y);

printf ("\n\nAnswer= %d",f);

printf ("press any key to close.");

getch ();
return 0;
}

Output


C Language mathematical formula

No comments :

Post a Comment

Note: Only a member of this blog may post a comment.

Copyright 2017. All Rights Reserved. Privacy Policy / Terms And Conditions / Sitemap / Contact