آلسلآم عليكم ورحمه آلله وبركآآته ,,
كيف حآلكم جميعآ ,,
ممكن تشوفين اذا محآولتي في حل هذا السؤآل صح آو لآ ,,,
آلسؤآل /
Write a program that inputs a list of 10 integers and prints the largest and smallest numbers.
محآولتي /
#include<iostream>
using namespace std;
int main()
{
int x;
int max;
int min;
//max=x;
cout<<"enter the number1:";
cin>>x;
for(int i=2;i<=9;i++)
{
cout<<"enter the number"<<i<<":";
cin>>x;
if(x>max)
max=x;
else
min=x;
}
cout<<"the max"<<max<<endl;
cout<<"the min"<<min<<endl;
return 0;
}وشكرآ :rose: