السلآم عليكم ورحمه آلله ,,
مسسآءآلخير جميعا
آخوآني / ممكن آحد يشرح لي هذا السؤآل , يعني ايش المطلوب؟
Write a recursive function Validate(char ch) that validate if value of the ch is *, #, %, &, @ or $, if not prompt the user to reenter it again.
السلآم عليكم ورحمه آلله ,,
مسسآءآلخير جميعا
آخوآني / ممكن آحد يشرح لي هذا السؤآل , يعني ايش المطلوب؟
Write a recursive function Validate(char ch) that validate if value of the ch is *, #, %, &, @ or $, if not prompt the user to reenter it again.
يعني مطلوب تكتبي function تقوم باستدعاء نفسها recursive
في الداله بتفحصي قيمة الحرف ch يعني بيكون من نوع char اذا كان الحرف واحد من الرموز اللي كتبتيها فابها مالم يسأل المستخدم ان يدخل الحرف مرة ثانية
يعني بتعملي فحص في الدالة ولو الحرف ما طابق تستدعي الدالة مرة ثانية
No intellectual battle was ever won through retreat
You do not watch Gintama? Dude, you are missing a lot!

يعني آلحلأ بيكون كذا
#include<iostream>
//#include<string>
using namespace std;
char chak()
{
char ch;
cout<<"Enter any litter : ";
cin >>ch;
if(ch=='*'||ch=='&'||ch=='%'||ch=='$'||ch=='#'|ch=='@')
chak();
return ch;
}
int main()
{
cout<<"the chois for you is : "<<chak()<<endl;
return 0;
}حسب سؤالك اللي مكتوب فوق
الشرط بيكون
if(ch!='*'&&ch!='&'&&ch!='%'&&ch!='$'&&ch!='#'&&ch!='@')
اذا انتي غلطتي وانتي بتكتبي السؤال هذا موضوع ثاني
No intellectual battle was ever won through retreat
You do not watch Gintama? Dude, you are missing a lot!
