أوراق باكية Posted ديسمبر 18, 2006 Report Share Posted ديسمبر 18, 2006 مررحبا .. زنووو بليييز ابي حل ذي الاسايمنت قبل تسليمه يوم الاربعا عيزني ,, و ذبحني و ماعرفت له المقرر كله لوعة جبد و ايييب القهر Q1# # Use do while Write a program that will read two integers and give the user a menu to choose wither to(add/subtract/divide/multiply or quit) it will keep giving the user the menu until the quits. Sample input/output Enter two numbers:9 5 Choose from the menu below: 1. addition 2. 2. subtraction 3. multiplication 4. division 5. quit your option is:1 the result is: 14 choose from the menu below: 6. addition 7. 2. subtraction 8. multiplication 9. division 10. quit your option is:2 the result is: 4 11. addition 12. 2. subtraction 13. multiplication 14. division 15. quit your option is:5 ================================ Q 2 ## (use for loop) Write a program that reads in the size of the side of a square and then prints a hollow square of that size out asterisks and blanks. Your program should work for squares of all side sizes between 1 and 20 .for example , if your program read a size of 5, it should print ***** * * * * * * ***** بلييييييييييييييز آنطرر الحل قبل الاربعا اذا ممكن .. و شكرا مقدما باااااااااااايز Quote Link to comment Share on other sites More sharing options...
*زنو* Posted ديسمبر 19, 2006 Report Share Posted ديسمبر 19, 2006 انشالله راح احاول فيه.. و احله. Quote Link to comment Share on other sites More sharing options...
*زنو* Posted ديسمبر 20, 2006 Report Share Posted ديسمبر 20, 2006 اوراق باكية هاي رقم 1.. الثاني ما عرفت شيبون بس بسأل لج معلمتنا و احاول احله.. تمرين 1 # include <iostream.h> int main() { int z,x=0,c,sum; cout<<"please Input two integers number"; cin>>x>>z; while (x>0) { cout<<"Choose from the menu below:\n1. addition\n 2. subtraction\n3. multiplication\n4. division\n5. quit\n"; cout<<"your option is:"; cin>>c; if (c==1) { sum=x+z; cout<<"the result is:"<<sum; } else if (c==2) { sum=x-z; cout<<"the result is:"<<sum; } else if (c==3) { sum=x*z; cout<<"the result is:"<<sum; } else if (c==4) { sum=x/z; cout<<"the result is:"<<sum; }else if (c==5) { sum=x+z; cout<<"the result is:"<<sum; return 0; } } return 0; } Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.