السلام عليكم ورحمه الله
الطلب: by using while statement write c++ program that print the even numbers between 0 and n, where n is a value enterd by the user
وهذا هو الكود الذي كتبته
#include<iostream.h>
#include<conio.h>
void main()
{
int n;
cout<<"enter the number ";
cin>>n;
while(n!=0)
{
cout<<"the even numbers between 0 and n are :"<<"\t";
cout<<(n+=2);
getch();
}
}المشكلة : بأنه يجب ضغط رز enter حتى يظهر الرقم الزوجي التالي والكود المطلوب اصلا اظهار الاعداد الزوجيه بين الصفر والرقم المدخل
اتمنى منكم مساعدتي وشكرا مقدما :)

