╞▒≡ LEARNINGS OF THE WEEK ▒╞

▲by: Hanz Rafael Salibo▲

In this week, Sept. 22-26, 2008, we made an activity. This is my work:
#include
#define p printf
#define s scanf
main()
{float q, w, e, r, t;
clrscr();
p("Enter the first number:");
s("%f",&q);
p("\nEnter the second number:");
s("%f",&w);
p("\nEnter the third number:");
s("%f",&e);
p("\nEnter the fourth number:");
s("%f",&r);
p("\nEnter the fifth number:");
s("%f",&t);
if (q>w && q>e && q>r && q>t)
{p("\n\nThe first number has the highest value");
p("\nIt has a value of %f",q);}
if (w>q && w>e && w>r && w>t)
{p("\n\nThe second number has the highest value");
p("\nIt has a value of %f",w);}
if (e>q && e>w && e>r && e>t)
{p("\n\nThe third number has the highest value");
p("\nIt has a value of %f",e);}
if (r>q && r>w && r>e && r>t)
{p("\n\nThe fourth number has the highest value");
p("\nIt has a value of %f",r);}...
getch();
}

Sunday, September 28, 2008

0 Comments:

 
ziee ++ :] BLOG! - Wordpress Themes is proudly powered by WordPress and themed by Mukkamu Templates Novo Blogger