Monday, 9 July 2012

c program for biggest of 3 numbers

For beginners
{I am going write the c program but before you need a c compiler(software).there are a lot of compilers(software) for windows 7  like Code::Blocks,dev c++ Download dev c++ its free and install it in your computer.open  dev c++ go to file-->new-->source file.}  


#include<stdio.h>
#include<conio.h>
main()
{
      float a,b,c,big;
      printf("enter three number \n");
      scanf("%f%f%f",&a,&b,&c);
      if(a>b)
      {
             if(a>c)
             {big=a;}
             else
             {big=c;}
             }
             else
             {
                 if(b>c)
                 {big=b;}
                 else
                 {big=c;}
                 }
                 printf("big number among this numbers (%f,%f,%f) is %f",a,b,c,big);
                 getch();
                 }


For beginners
{After typing this program go to execute-->compile & run-->a window will pop-up-->give file name:(anything u like)-->save as type: c source files-->click save.}

IS IT HELPFIL? comment.


No comments:

Post a Comment