شايمة الجامعة Posted نوفمبر 25, 2006 Report Share Posted نوفمبر 25, 2006 السلاااااااااااااااام قوة ياشعب شخباركم مع التستات انشالله توفقتو المهم .. يعني لو ما آنه انزل طلب اني ابي حل الاسايمنت محد اينزله؟؟ أدري بتقولون ان هاذي ماتحل وتبي على طول بارز لا إلا أحل بس ماعرف ارتبه عدل اعرف الفكرة بس ماعرف اصفه عدل .. على الاقل انه جريئة احطه وافيد اللي يبونه بعد ابحلولكم ومشكورين مقدما واذا تبون اكتب السؤال باكتبه .. بس لان اهو وايد طويل من جذي ماكتبته.. تحيااااااااااتي Quote Link to comment Share on other sites More sharing options...
bo_jssom Posted نوفمبر 26, 2006 Report Share Posted نوفمبر 26, 2006 اختي انه لي الحين ماعطوني بس حطي لي السؤال وباحله لج انشالله Quote Link to comment Share on other sites More sharing options...
a7la dala3 Posted نوفمبر 26, 2006 Report Share Posted نوفمبر 26, 2006 (edited) Good Luck .. مو من صوبي .. Edited نوفمبر 26, 2006 by a7la dala3 Quote Link to comment Share on other sites More sharing options...
شايمة الجامعة Posted نوفمبر 27, 2006 Author Report Share Posted نوفمبر 27, 2006 مشكورين حبايبي على مروركم وهاي السؤال Write a program that simulates an order room of a factory. To fill an order, workers place items on a conveyer belt to be grouped, billed, and shipped. Each item has a UPC code that designates the name of the item and its price. When an order is complete, a worker places a bar on the conveyor belt to separate the order from the next order. The bar has a UPC code of 999 is a sentinel value. After the computer system scans the UPC code of each item, it records the name and price in a file named invoice1.txt. This output file contains the product name and price on one line, separated by a pound sign (#). For example, if hammer were purchased for the price of 9.95, the program writes this line as hammer#9.95. the program does not write the sentinel value to the output file. In your program, use while repetition construct. Because this is a program simulation, prompt the user to enter the name and price of each item. On a real order-scanning machine, no prompt would be used. When the system reads the value 999, display a thank you message, the name of the output file, and each item and price added to the output file. The input entered by the user is: Please scan the name of the first item: hammer Please scan the price of the hammer: 9.95 Please scan the name of the next item: saw Please scan the price of the saw: 20.15 Please scan the name of the next item: shovel Please scan the price of the shovel: 35.40 Please scan the name of the next item: 999 Thank you for your order. Invoicel1 . txt Hammer#9.95 Saw#20.15 Shovel#35.40 ومشكورين مقدما ويعطيكم العافية تحيااااااااااااتي شايمة Quote Link to comment Share on other sites More sharing options...
صدى الآهات Posted نوفمبر 29, 2006 Report Share Posted نوفمبر 29, 2006 هذي هو الحل خيتو #include<iostream> #include<fstream> #include<string> #include<iomanip> using namespace std; void main() { string name; double price; int count=0; ofstream outfile; outfile.open("invoicel2.txt"); outfile<<"Thank you for your order."<<endl; outfile<<"invoicel.txt"<<endl; name="0"; cout<<"Please scan the name of the first item: "; cin>>name; while(name!="999") { count++; outfile<<name<<'#'; cout<<"Please scan the price of the "<<name<<" "<<":"; cin>>price; outfile<<price<<endl; cout<<"\nPlease scan the name of the next item: "; cin>>name; } outfile.close(); ifstream infile; infile.open("invoicel2.txt"); infile.ignore(50,'\n'); infile.ignore(50,'\n'); cout<<"Thank you for your order."<<endl; cout<<"invoicel.txt"<<endl; infile>>name; while(count>0) { count--; cout<<name<<endl; infile>>name; } infile.close(); } Quote Link to comment Share on other sites More sharing options...
شايمة الجامعة Posted نوفمبر 30, 2006 Author Report Share Posted نوفمبر 30, 2006 السلاااااااااااااااام مشكوور عمري صدى الاهات ويعطيج الف عافية اخدمج انشالله عروس تحيااااااااااااااااااتي Quote Link to comment Share on other sites More sharing options...
صدى الآهات Posted ديسمبر 1, 2006 Report Share Posted ديسمبر 1, 2006 ولكم حاضرين لطيبين 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.