Find the highest of three numbers and print them using ascending orders?
#include<stdio.h>
main()
{
int a[3],i,f,s;
clrscr();
printf("enter 3 no's");
for( i=0;i<3;i++)
{
scanf("%d",&a[i]);
}
/* sorting starts here*/
for (f=0;f<3;f++)
{
for(s=f+1;s<3;s++)
{
if(a[s]<a[f])
{
temp=a[s];
a[s]=a[f];
a[f]=temp;
}
}
}
/* now sorted array is*/
for(int x=0;x<3;x++)
{
printf("%d",a[x]);
}
/* biggest elt is*/
printf("%d",a[2]);
getch();
}
| Is This Answer Correct ? | 3 Yes | 0 No |
what is array?
What will the preprocessor do for a program?
Write a C Programm.. we press 'a' , it shows the albhabetical number is 1, if we press 'g' it shows the answer 7.. any can help me
Write a program that receives as input a number omaadel-n-print, four digits.
Why double pointer is used in c?
a=(1,2,3); b=1,2,3; c=1,(2,3); d=(1,2),3; what's the value of 'a','b','c','d'
Differentiate abs() function from fabs() function.
What is the main difference between calloc () and malloc ()?
How is a two dimensional array passed to function when the order of matrix is not known at complie time?
Q-1: Create a structure to specify data on students given below: Roll number, Name, Department, Course, Year of joining Assume that there are not more than 450 students in the college.
Explain high-order bytes.
What are the functions to open and close the file in c language?