Results 1 to 4 of 4

Thread: /*write a program that input five integers . it finds and print the largest and sma

  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 /*write a program that input five integers . it finds and print the largest and sma

    salam::
    /*write a program that input five integers . it finds and print the
    largest and smallest integer */
    #include <iostream>
    #include <conio.h>
    using namespace std;
    int main()
    {
    int a,s,d,f,g,min,max;
    cout<<"Input your five numbers:"<<endl;
    cin>>a>>s>>d>>f>>g;
    min=max=a;
    if(max>s)max=s;
    if(max>d)max=d;
    if(max>f)max=f;
    if(max>g)max=g;
    if(min<s)min=s;
    if(min<d)min=d;
    if(min<f)min=f;
    if(min<g)min=g;
    cout<<"The largest number is="<<max<<endl;
    cout<<"The smallest number is="<<min<<endl;
    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

    وعلیکم السلام
    --------
    آپ نے بہت اچھے طریقے سے
    پانچ نمبرز کو یوزر سے حاصل کر کے سب سے بڑا اور چھوٹا نمبر پرنٹ کرنے کا طریقہ ہمارے ساتھ شئیر کیا
    جزاک اللہ
    اب اس کو بھی حل کر دیں
    writ a program to print the total marks and percentage of any five subjects..take maks as input from the user

  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

    Nice

    - - - Updated - - -

    Nice
    Love is silent killer

  4. #4
    Fiazsaqi's Avatar
    Fiazsaqi is offline Senior Member+
    Last Online
    1st March 2017 @ 02:44 PM
    Join Date
    29 Dec 2012
    Age
    30
    Gender
    Male
    Posts
    59
    Threads
    3
    Credits
    65
    Thanked
    3

    Default

    //for 15 nmbrs or 1500 numbrs
    #include<iostream>
    using namespace std;
    int main()
    {
    int fk[15],max,min,i;
    cout<<"Enter 15 nmbr";
    for(i=0;i<15;i++)
    cin>>fk[i];


    max=min=fk[0];
    for(i=0;i<15;i++)
    {
    if(fk[i]<min)
    min=fk[i];
    if(fk[i]>max)
    max=fk[i];
    }
    cout<<"min"<<min<<"\nMaximm"<<max;
    }

Similar Threads

  1. SMS Input -Quick Input By Scan Barcode
    By Afridi in forum Softwares
    Replies: 8
    Last Post: 11th December 2013, 10:43 PM
  2. Replies: 2
    Last Post: 1st April 2013, 11:05 AM
  3. Write Urdu in MS Window , MS Office and any other Program
    By farooqanjum9 in forum Website Reviews
    Replies: 4
    Last Post: 11th August 2011, 02:42 PM
  4. Replies: 2
    Last Post: 12th February 2009, 07:43 AM

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
  •