السلام عليكم ورحمة الله وبركاتة
لديّ مشروع لمادة البرمجة (1) c++ عبارة عن آلة حاسبة بسيطة وقد أتممت كتابة الكود -الكود موجود في المرفقات- باستخدام الفنكشن
لكن وجدت صعوبة في تطبيق شرط أن يُسمح لليوزر بإدخال رقمين أو ((أكثر )) لإتمام عملية الجمع والطرح والضرب والقسمة والأكبر والأصغر عدد !
استخدمت الفور لوب لإدخال أكثر من رقمين , لكن ظهر 19 إيرور ..
ارجو منكم أن تساعدوني في تصحيح الإيرور وتشغيل الآلة بالشكل الصحيح قبل منتصف الليل غدًا ..
هذا هو السؤال : والكود في المرفقات كما أسلفت ..
Write a C++ program to simulate a calculator for addition,
subtraction , multiplication, division , square root , factorial ,
Modulus , maximum , minimum and average operations :
1- A welcome message and the name of the project at first .
2- Operations are selected from the menu at first .
3- Define a function for each operation.
4- After the implementation of operation, ask the users if
they want another operation .
5- Take all values from the user .
6- Notes :
1- addition, subtraction , multiplication, division ,maximum
, minimum and average operations can be applied on
two numbers and more .
2- square root and factorial operations can be only
applied on one number.
3- Modulus operations can be only applied on two
numbers.