Results 1 to 3 of 3

Thread: find maximum between three numbers

  1. #1
    appteach is offline Junior Member
    Last Online
    18th February 2016 @ 05:33 PM
    Join Date
    01 Feb 2016
    Age
    28
    Gender
    Male
    Posts
    13
    Threads
    4
    Credits
    0
    Thanked
    2

    Thumbs up find maximum between three numbers


    get 3 numbers and find maximum number
    __________________________________
    #include <iostream>
    #include <conio.h>
    using namespace std;
    int main()
    {
    int a,b,c,max;
    cout<<"Enter your first number:"<<endl;
    cin>>a;
    cout<<"Enter your second number:"<<endl;
    cin>>b;
    cout<<"Enter your third number:"<<endl;
    cin>>c;
    max=a; //assiging value of a to maximum //
    if(b>max) //if maximum is b then //
    max=b; //maximum is b//
    if(c>max) //if value of c is greater than b then//
    max=c; //maximum is c//
    cout<<"The greater number is:"<<max; //max value is asign in this statement//
    return 0;

    }

  2. #2
    AsifSattarvi's Avatar
    AsifSattarvi is offline Advance Member
    Last Online
    12th October 2022 @ 02:54 PM
    Join Date
    20 May 2012
    Gender
    Male
    Posts
    6,594
    Threads
    104
    Credits
    30,058
    Thanked
    960

    Default

    بہت شکریہ
    یہ کوڈ ہمارے ساتھ شئیر کرنے کا

  3. #3
    Ali_shanbani's Avatar
    Ali_shanbani is offline Senior Member+
    Last Online
    28th July 2018 @ 11:52 AM
    Join Date
    14 Dec 2015
    Location
    @ITDunya.com
    Gender
    Male
    Posts
    474
    Threads
    47
    Credits
    3,213
    Thanked
    34

    Default

    V nice

    - - - Updated - - -

    V nice
    Love is silent killer

Similar Threads

  1. 3D studio maximum
    By student123 in forum Courses
    Replies: 9
    Last Post: 19th December 2015, 02:17 PM
  2. Maximum Ram Support
    By fezzan789 in forum Ask an Expert
    Replies: 1
    Last Post: 3rd March 2013, 08:03 PM
  3. Replies: 4
    Last Post: 3rd July 2011, 03:53 PM
  4. Maximum downloading
    By shahid_786 in forum Ask an Expert
    Replies: 2
    Last Post: 12th April 2010, 12:33 PM
  5. Maximum Download
    By wadibahi in forum General Discussion
    Replies: 2
    Last Post: 27th February 2010, 09:19 PM

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
  •