هذا هو السؤال
Write a program that takes three numbers from the user and print the largest and the smallest number.
ومعناه اكتب برنامج يخليك تدخل ثلاث ارقام ويضهر اكبر رقم واصغر رقم
وهذي محاولتي الفاشلة
#include<iostream>
using namespace std;
int main()
{
int x;
int y;
int z;
int largest ;
int smallest ;
cout<<"enter three number :" <<endl;
cin>>x,y,z;
if (x > y && x > z)
{
cout <<"largest : "<<x<< endl;
}
getchar();getchar();
return 0;
}