Go Back   TechArena Community > Software > Software Development
Become a Member!
Forgot your username/password?
Tags Active Topics RSS Search Mark Forums Read

Reply
 
Thread Tools Search this Thread
  #1  
Old 10-01-2009
Member
 
Join Date: Apr 2008
Posts: 2,001
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;
}
Reply With Quote
  #2  
Old 10-01-2009
Member
 
Join Date: Apr 2008
Posts: 2,001
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.
Reply With Quote
Reply

  TechArena Community > Software > Software Development
Tags:



Thread Tools Search this Thread
Search this Thread:

Advanced Search


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


All times are GMT +5.5. The time now is 12:28 PM.