The world’s Largest Sharp Brain Virtual Experts Marketplace Just a click Away
Levels Tought:
Elementary,Middle School,High School,College,University,PHD
| Teaching Since: | May 2017 |
| Last Sign in: | 405 Weeks Ago, 6 Days Ago |
| Questions Answered: | 66690 |
| Tutorials Posted: | 66688 |
MCS,PHD
Argosy University/ Phoniex University/
Nov-2005 - Oct-2011
Professor
Phoniex University
Oct-2001 - Nov-2016
Can anyone tell me what's wrong with this c++ program? I need the program to return the first and sexond largest numbers that the user enters.
{
  int num1, num2, num3;
  int largest, secondLargest;
  printf("Enter number 1: ");
     scanf("%d",&num1);
  printf("Enter number 2: ");
     scanf("%d",&num2);
  printf("Enter number 2: ");
     scanf("%d",&num3);
     {
  if(num1>num2);
     largest==num1;
     if(num3>num1);
     secondLargest==num1;
        largest==num3;
       Â
  printf("The largest number is: %d\n"),largest;
  printf("The second largest number is: %d"),secondLargest;
     }
  return 0;
}
Hel-----------lo -----------Sir-----------/Ma-----------dam-----------Tha-----------nk -----------You----------- fo-----------r u-----------sin-----------g o-----------ur -----------web-----------sit-----------e a-----------nd -----------and----------- ac-----------qui-----------sit-----------ion----------- of----------- my----------- po-----------ste-----------d s-----------olu-----------tio-----------n.P-----------lea-----------se -----------pin-----------g m-----------e o-----------n c-----------hat----------- I -----------am -----------onl-----------ine----------- or----------- in-----------box----------- me----------- a -----------mes-----------sag-----------e I----------- wi-----------ll