Thursday, February 18, 2016

Code C Programe

#include<stdio.h>
main()
{
      int a,b,c,d,e,ln;
      printf("Enter five numbers:");
      scanf("%d%d%d%d%d",&a&b&c&d&e);
      if(a>b)
         if(a>c)
            if(a>d)
               if(a>e)
                  ln=a;
               else
                 ln=e;
            else
               if(d>e)
                 ln=d;
               else
                 ln=e;
            else
              if(c>d)
                if(c>e)
                  ln=c;
                else
                  ln=e;
            else
              if(b>c)
              if(b>d)
                if(b>e)
                  ln=b;
                else
                  ln=e;
            else
              if(d>e)
                ln=d;
              else
                ln=e;
      printf("the largestnumber is: %d\n",ln);
                        
  }      

No comments:

Post a Comment