Yahoo Answers is shutting down on May 4th, 2021 (Eastern Time) and beginning April 20th, 2021 (Eastern Time) the Yahoo Answers website will be in read-only mode. There will be no changes to other Yahoo properties or services, or your Yahoo account. You can find more information about the Yahoo Answers shutdown and how to download your data on this help page.
Trending News
Help with a C program that ask for three integer numbers. That also displays them in acending order and...?
if they are any equal(same) numbers they should't perform. part 1 example output please input number 1: 2 please input number 2: 1 please input number 3:5 the order of your input is :1,2,5 part2 example output please input number 1:9 please input number 2:3 please input number 3:9 number 1 and number 3 are equal program can't continue! //please help me out with advice on what i could do. I think if else statements with conditional operators.
2 Answers
- Anonymous10 years agoFavorite Answer
include<stio.h>
#include<conio.h>
int Nums[3];
void Sort()
{
// write the program to sort Nums array ( may be bubble sort)
}
void main()
{
int i=0;
for(i=0;i<3;i++)
{
printf("Enter Number %d i:");
scanf("%d",&Nums[i]);
}
Sort();
for(i=0;i<3;i++)
{
printf("Entered Numbers are: %d \n",Nums[i]);
}
getch();
}
you can also raise a ticket in www.grasshoppernetwork.com to get the complete support on your programming problems.
Source(s): http://www.grasshoppernetwork.com/ - fodorLv 44 years ago
What i'd do is to get the 5 numbers, kind the array and spit out the first or very last 3 reckoning on which way you taken care of. Aleternatively you should attempt this: Get the first 3 numbers and push them on to an array loop Get the subsequent volume evaluate it to the first array component if it truly is more beneficial, then replace it in the different case bypass to the subsequent component and repeat the evaluation do this for all 3 aspects. if it truly is not any more beneficial than any of your aspects, flow on bypass lower back to loop till you've 5 numbers entered. desire that enables!