1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
|
#include <stdio.h>
int main()
{
int a,b,c,max,min,mid;
printf("Enter 3 numbers: \n");
scanf("%d,%d,%d",&a,&b,&c);
max=a;
if(b>max) max=b;
if(c>max) max=c;
//I want to use printf,scanf instead of cout,cin!
min=a;
if(b<min) min=b;
if(c<min) min=c;
mid=(a+b+c)-(max+min);
printf("Numbers are printed from min to max:\n%d\n%d\n%d",min,mid,max);
return 0;
}
|