Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
Node is saved as draft in My Content >> Draft
  • C program to find largest number from three number

    • 0
    • 1
    • 0
    • 0
    • 1
    • 0
    • 0
    • 0
    • 1.12k
    Comment on it

    /C program to find largest number from three number */
    /
    Program illustrate how to detemine the largest no given by User. In this program the no entered is in floating format and with the help of if syntax it detmine maximum number.....*/

    int main(){
          float a, b, c;
          printf("Enter three numbers: ");
          scanf("%f %f %f", &a, &b, &c);
          if(a>=b && a>=c)
             printf("Largest number = %.2f", a);
          if(b>=a && b>=c)
             printf("Largest number = %.2f", b);
          if(c>=a && c>=b)
             printf("Largest number = %.2f", c);
          return 0;
    

    Output

    Enter three numbers: 12.2
    13.452
    10.193
    Largest number = 13.45
    
    C

 1 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: