Results 1 to 2 of 2

Thread: Find Largest No

  1. #1
    Join Date
    Apr 2008
    Posts
    2,005

    Find Largest No

    hi,
    This program is to find lsmallest no between the given three no.
    suppose the given no are a, b and c.
    Code:
    #include <stdio.h>
    #include <conio.h>
    main()
    {    
     int p,q,r,smaller;
     printf("Enter Three numbers");
     scanf("%d%d%d",&p,&q,&r);
     if(p<q)
          if(p<r)
                smaller=p;
            else
                smaller=r;
        else
            if(q<r)
                smaller=q;
            else
                smaller=r;
        printf("The smallest no between given three no is of %d,%d and %d = %d",p,q,r,smaller);
    return 0;
    }

  2. #2
    Join Date
    Apr 2008
    Posts
    2,005

    Re: Find Largest No

    hi,
    if you want to find the largest no then change the smaller-than sign.put greater-than sign it will give you the largest no among the entered no.

Similar Threads

  1. Which is the largest Android tablet yet
    By J.C. in forum Portable Devices
    Replies: 4
    Last Post: 17-07-2012, 12:03 PM
  2. program to find the largest value in java.
    By Luis-Fernando in forum Software Development
    Replies: 3
    Last Post: 26-11-2009, 06:12 PM
  3. How to find second largest value from array
    By Jaheel in forum Software Development
    Replies: 3
    Last Post: 18-11-2009, 11:42 AM
  4. Largest 3g network
    By Holt in forum Technology & Internet
    Replies: 3
    Last Post: 28-07-2009, 11:09 AM
  5. World's Largest 98gb RAM
    By WaGoN in forum Motherboard Processor & RAM
    Replies: 2
    Last Post: 27-12-2008, 08:34 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,713,928,661.31028 seconds with 16 queries