التسجيل | التعليمـــات | التقويم | البحث | مشاركات اليوم | اجعل كافة الأقسام مقروءة |
16-10-2013, 03:54 PM | رقم المشاركة : ( 31 ) | |
طالب مثالي
|
#include<iostream>
#include<string> #include<iomanip> #include<fstream> usingnamespace std; int main() { string firstname,lastname ; double salary,percentage; ifstream infile; ofstream outfile; infile.open("Ch3_Ex8Data.txt"); outfile.open("Ch3_Ex8Output.txt"); infile>>firstname>>lastname>>salary>>percentage; outfile<<firstname<<" "<<lastname<<" "<<showpoint<<fixed<<setprecision(2)<<salary+(salar y*(percentage/100.0))<<endl; infile>>firstname>>lastname>>salary>>percentage; outfile<<firstname<<" "<<lastname<<" "<<showpoint<<fixed<<setprecision(2)<<salary+(salar y*(percentage/100.0))<<endl; system("pause"); infile.close(); outfile.close(); return 0; } بس عندك ; ف اليمين لازم و حتى الاقواس # من اليسار |
|
16-10-2013, 09:03 PM | رقم المشاركة : ( 32 ) | |
طالب مبتدئ
|
csc103
بغيت مساعده ف الاسايمنت حليته بس يطلع الاوت بوت غلط
هذا السؤال , Write a program that reads two integers representing hours and minutes from a file named “time.txt”. The program should convert the time (hours and minutes) to minutes and seconds. Your program should write the result in new file called “output.txt” as the sample below: Time in Minutes = 615 Time in Seconds = 36900 10 15 output.tx time.txt |
|
16-10-2013, 09:08 PM | رقم المشاركة : ( 33 ) | |
طالب مبتدئ
|
الان بوت 10 15 و الاوت بوت615و 36900
الفايل يستوي بس الجواب يصير سالب ماادري ليش و ده حلي #include<string> #include<iostream> #include<fstream> usingnamespace std; int main() { ifstream inputf; ofstream outputf; int h,m,time; inputf.open("time.txt"); outputf.open("output.txt"); time=(h*60)+m; outputf<<"Time in Minutes is="<<time<<endl; time=time*60; outputf<<"Time in Seconds is ="<<time; system("pause"); inputf.close(); return 0; } |
|
27-10-2013, 08:26 PM | رقم المشاركة : ( 34 ) | |
طالب مبتدئ
|
thanks alot
|
|
30-10-2015, 06:26 PM | رقم المشاركة : ( 35 ) | |
طالب مبتدئ
|
|
|
مواقع النشر (المفضلة) |
أدوات الموضوع | إبحث في الموضوع |
انواع عرض الموضوع | |
|
|