Jump to content

otai_g

Members
  • Content Count

    239
  • Joined

  • Last visited

Community Reputation

3 Normal

About otai_g

  • Rank
    Ahli
  • Birthday 12/17/1983

Contact Methods

  • Website URL
    http://
  • ICQ
    0
  • Yahoo
    spaceship83

Profile Information

  • Gender
    Male
  • Location
    spaceworld
  • Interests
    music, computer & internet..

Recent Profile Visitors

4025 profile views
  1. jom memeriahkan semula putera.com
  2. apa cerita kelab ni. senyap jerk..
  3. setakat tinggal anak kat car seat dan isi minyak dkt pump, bayar guna kredit kad x jd hal. kira ok lah tu. x kan nak pam minyak sambil dukung anak. yg tukang komen ni pun bg pendapat mcm x ada otak. pelik aku. yg jd masalah tinggal anak pastu berjalan dkt kaunter nak bayar. ha ini masalah sbb takut ada org bawak lari kereta.
  4. app ni ada kekurangan jgk. 1st bleh pki kat petronas jerk. 2nd x semua stesen petronas support. ari tu aku g petronas x support lah plk.
  5. coding ni ada bug, kalo nak key in grade make sure guna HURUF BESAR. /* */ #include <iostream> #include <sstream> using namespace std; struct gpa { string name, matric, grade[7]; int credit[7], point[7]; }student; double pointcal(string grade); void calculate_gpa(); void print(); void main() { cout << "\nENTER NAME: "; cin>> student.name; cout << "ENTER MATRIC NUMBER: "; cin>> student.matric; cout<<"\nENTER GRADE FOR THE FOLLOWING SUBJECT:-"<<endl; cout<<"MTD3062 : Aplikasi Perkhidmatan Internet:"; cin>> student.grade[0]; cout<<"SUBJECT CREDIT :"; cin >> student.credit[0]; cout<<"FMW3032 : Wacana Akademik Bahasa Melayu:" ; cin>> student.grade[1]; cout<<"SUBJECT CREDIT :"; cin >> student.credit[1]; cout<<"HNS2013 : Kenegaraan :"; cin>> student.grade[2]; cout<<"SUBJECT CREDIT :"; cin >> student.credit[2]; cout<<"MTS3013 : Pengaturcaraan Berstruktur: "; cin>> student.grade[3]; cout<<"SUBJECT CREDIT :"; cin >> student.credit[3]; cout<<"CMP2011 : Pengurusan Kokurikulum: "; cin>> student.grade[4]; cout<<"SUBJECT CREDIT :"; cin >> student.credit[4]; cout<<"MTK3013: Struktur Diskrit :"; cin>> student.grade[5]; cout<<"SUBJECT CREDIT :"; cin >> student.credit[5]; cout<<"MTN3013 : Senibina dan Organisasi Komputer:"; cin>> student.grade[6]; cout<<"SUBJECT CREDIT :"; cin >> student.credit[6]; print(); } double pointcal(string grade) { if (grade=="A") { return 4.0; } else if (grade=="A-") { return 3.75; } else if (grade=="B+") { return 3.5; } else if (grade=="B") { return 3.25; } else if (grade=="B-") { return 3.0; } else if (grade=="C+") { return 2.75; } else if (grade=="C") { return 2.5; } else if (grade=="C-") { return 2.25; } else if (grade=="D") { return 2.0; } else if (grade=="E") { return 1.5; } else if (grade=="F") { return 1.25; } else { return 0; } } void calculate_gpa() { double gpa_s; double total_point = 0; double total_credit = 0; int i; for (i=0; i<7; i++) { student.point[i] = pointcal(student.grade[i]) * student.credit[i]; total_point += student.point[i]; total_credit += student.credit[i]; } gpa_s = total_point / total_credit; cout<<"GPA: "<<gpa_s<<endl; } void print() { cout<<endl; cout<<"\nNAME: "<<student.name; cout<<"\tMATRIC NUMBER: "<<student.matric; cout<<"\nMTD3062 : Aplikasi Perkhidmatan Internet: "<<student.grade[0]; cout<<"\nFMW3032 : Wacana Akademik Bahasa Melayu: "<<student.grade[1]; cout<<"\nHNS2013 : Kenegaraan: "<<student.grade[2]; cout<<"\nMTS3013 : Pengaturcaraan Berstruktur: "<<student.grade[3]; cout<<"\nCMP2011 : Pengurusan Kokurikulum: "<<student.grade[4]; cout<<"\nMTK3013 : Struktur Diskrit: "<<student.grade[5]; cout<<"\nMTN3013 : Senibina dan Organisasi Komputer: "<<student.grade[6]<<endl; calculate_gpa(); }
×
×
  • Create New...