void main()
{
int a,b,c;
clrscr();
printf("Enter the value of a:");
scanf("%d",&a);
printf("\nEnter the value of b:");
scanf("%d",&b);
printf("\nEnter the value of c:");
scanf("%d",&c);
if(a>b)
{
if(a>c)
{
if(b>c)
{
printf("c is smallest\n");
printf("b is middle\n");
printf("a is largest\n");
}
else
{
printf("b is smallest\n");
printf("c is middle\n");
printf("a is largest\n");
}
}
else
{
printf("b is smallest\n");
printf("a is middle\n");
printf("c is largest\n");
}
}
else
if(b>c)
{
if(a>c)
{
printf("c is smallest\n");
printf("a is middle\n");
printf("b is largest\n");
}
else
{
printf("a is smallest\n");
printf("c is middle\n");
printf("b is largest\n");
}
}
else
{
printf("a is smallest\n");
printf("b is middle\n");
printf("c is largest\n");
}
getch();
}
It depends on to what level of accuracy you tend to have with the output of your program Accuracy can be treated as: (Desired Output / Actual Output of your Program)
Output documentation
Without Using Arrays Program: #include<stdio.h> main() { int n,m,i,max; printf("How many numbers(n) you going to enter:"); scanf("%d",&n); printf("Enter the numbers:"); scanf("%d",&m); max=m; for(i=2;i<=n;i++) { scanf("%d",&m); if(m>max) max=m; } printf("The Largest Number is %d",max); } Output: How many numbers(n) you going to enter:5 Enter the numbers: 25 410 362 5 56 The Largest Number is 410 With Using Arrays Program: #include<stdio.h> #include<conio.h> void main() { int max_num(int a[],int n); int max,i,n; int a[50]; clrscr(); printf("Enter n number:"); scanf("%d",&n); printf("Enter the numbers:"); for(i=0;i<n;i++) scanf("%d",&a[i]); max=max_num(a,n); printf("The largest number is %d",max); getch(); } int max_num(int a[],int n) { int i,m=0; for(i=0;i<n;i++) { if(a[i]>m) m=a[i]; } return m; } output: Enter n number:10 Enter the numbers: 123 456 789 963 852 147 5 56 600 753 The largest number is 963
input output bound program is a program (or process in precise way), which spends most of time allocated to it for execution, on input/output devices and need very small CPU time for it.
The answer is the quantity of the two numbers
A Computer Output Electricity in Computercraft cannot be said to make a program to output power, regardless of the side.
you mean like show some sample output? Just put it in comments at the bottom. Run the program, and in the top left of the command prompt there is a button you can click. Select mark, highlight the output, then select copy. Paste it onto the end of the program.
It is an output!
How do you write a program with do while loop so that the output is 123456 =720
1) source program to object program 2)object program to object program output
example output of c++ calculator