Advertisements
Advertisements
Question
Write a program in C++ to read three integers and find smallest of these numbers:
Code Writing
Solution
void main ()
{ int a; b; c;
cout<< " Enter three no. = ";
cin >> a>>b>>c;
int small = a;
if (b < small)
{ small = b; }
if ( c < small )
{ small = c; }
cout<<" /n smallest no = "<< small;
getch ();
}
shaalaa.com
Is there an error in this question or solution?