وردة القمر Posted ديسمبر 15, 2006 Report Posted ديسمبر 15, 2006 السلام عليكم ورحمة الله وبركاته،، اتمنى تساعدوني في حل هالاسايمنت اللي فجر راسي وماعرفت احله ،، وامتبخلون علينا لو تعرفون Proplem#1 A community hospital needs a program to compute and print a statement for each patient. Charges for each day are as follows: 1. room charges: private, $125.0; semiprivate, $95.0; ward, $75.0 2. telephone charges: $1.75 3. television charges: $3.50 Write a program to get data from the keyboard, and compute the patient’s bill statement. The program should continue for the next patient until the user enters ‘N’ [Hint: Use do-while loop for the no: of patients]. The sample output is given below: Enter the No: of Days: 5 Type of room Used: p Telephone Used: N Television Used: Y Community hospital ***************** Patient billing Number of days in hospital: 5 Type of room: P Room charge: $625.00 Telephone charge: $0.00 Television charge $17.50 Patient: 1 Total due $642.50 Do you want to continue: Y Enter the no: of days: 1 Type of room used: w Telephone used: N Television used: N Community hospital ***************** Patient billing Number of days 1 Type of room W Room charge $0.0 Phone charge $0.0 TV charge $0.0 Total Due $75.0 Do you want to continue: N Patient 2 Proplem#2 A perfect number is positive number such that the sum of the proper divisors equals the number. Thus, 28=1+2+4+7+14 is perfect number. If the sum of the divisors is less than the number, it is deficient, if sum exceeds the number, it is abundant, and otherwise it is perfect number. [hint: use any loop starting from 1 to the entered value. Use if- condition for checking the divisors]. Quote
وردة القمر Posted ديسمبر 18, 2006 Author Report Posted ديسمبر 18, 2006 يعني شنو ماكوا احد يبيساعدني ترى تسليمه باجر الاربعاء ياربي شسووي يعني باخذ صفر بلييز ولي يخليكم ويسلمكم ويعافيكم ساعدوني Quote
وردة القمر Posted ديسمبر 19, 2006 Author Report Posted ديسمبر 19, 2006 بليييز بلييز ابي الحل قبل باجر ترى الدكتور باجر يحط لي صفر ياريت ياريت بسرعة تحطين لي الحل قبل باجر الصبح والله يعطيج العافية Quote
*زنو* Posted ديسمبر 20, 2006 Report Posted ديسمبر 20, 2006 سوري.. النت مقطوع بالبيت.. آنا حليت الحين بالجامعة.. تمرين الاول الثاني بعد شوي راح احول فيه.. #include<iostream.h> int main(); { float x,z,c,v,b,a,k,h,v; do { cout<<"Enter the No: of Days:\nType of room Used:\nTelephone Used:\nTelevision Used:\nCommunity hospital\n*****************"; cin>>z>>x>>c>>v; if (x==p) { x=125.0; } else if (x==s) { x=95.0; } else { x=75.0; } a=z*x; if (c==y) { c=1.75; } else { return 0; } b=z*c; if (v==y) { v=3.50; } else { return 0; } f=z*v; h=a+b+f; cout<<"Patient billing\nNumber of days in hospital:"<<z<<"\nType of room:"<<x<<"\nRoom charge:"<<a<<"\nTelephone charge:"<<b<<"\nTelevision charge"<<f<<"\nTotal Due"<<h; cout<<"Do you want to continue" cin>>k; } while (k=='y') return 0; } Quote
وردة القمر Posted ديسمبر 22, 2006 Author Report Posted ديسمبر 22, 2006 اوكي مشكورة اختي تعبتج معاي على العموم انا وديته للدكتور مع الاخطاء وخرابيطي على الله يحطون لنا شي عدل وماقصرتي الله يعطيج العافية Quote
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.