I amtrying to compile this C++ Program as a C program. I know that coutis the sa
ID: 3618621 • Letter: I
Question
I amtrying to compile this C++ Program as a C program. I know that coutis the same as printf and cin is the same as scanf in C howeverthat is as far as I can get can a lifesaver please help me convertthis to a C program.
#include<iostream.h>
#include<iomanip.h>
#define MINIMUM2( X, Y ) ( ( X ) < ( Y ) ? ( X ) : ( Y ))
#define MINIMUM3( U, V, W ) ( MINIMUM2( W, MINIMUM2( U, V ) ))
intmain()
{
inta, b, c;
double d, e, f;
cout<< "Enter three integers: ";
cin>> a >> b >> c;
cout<< "The minimum of " << a << ", " << b<< ", and " << c
<< " is " << MINIMUM3( a, b, c ) <<" Enter three doubles: ";
cin>> d >> e >> f;
cout.setf( ios::fixed | ios::showpoint );
cout<< "The minimum of " << setprecision( 2 ) << d<< ", "
<< e<< ", and " << f << " is " << MINIMUM3( d,e, f ) << ' ';
return 0;
}
Explanation / Answer
#include #define MINIMUM2(X,Y)(XRelated Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.