Ceriwis  

Go Back   Ceriwis > HOBI > Komputer & Teknologi > Programming

Programming Share, tanya jawab, saling bantu antar programmer dengan berbagai macam bahasa pemrograman.

Reply
 
Thread Tools
  #1  
Old 20th November 2011
SinggahDapur SinggahDapur is offline
Ceriwiser
 
Join Date: Nov 2011
Posts: 348
Rep Power: 14
SinggahDapur mempunyai hidup yang Normal
Default Toloooong...!!!!

agan2 sekalian,bagi2 ilmu dong sekalian tolongin ane gan,lagi stuck di pagi hari ini ngerjain tugas c++.






Quote:





++++++output+++++



Write C++ using struct which will produce the following output:-





Enter student number 1:> Yoges

Enter student number 1 �s ID:> 123

Enter student number 1�s marks :> 45



Enter student number 2:> Ali

Enter student number 2 �s ID:> 345

Enter student number 2�s manrks: > 67



Enter student number 3:> Chong

Enter student number 3 �s ID:> 432

Enter student number 3�s manrks: > 78



Enter student number 4:> Raja

Enter student number 4 �s ID:> 657

Enter student number 4�s manrks: > 76



Enter student number 5:> Stanley

Enter student number 5 �s ID:> 765

Enter student number 5�s manrks: > 80





Name ID Marks

Yoges 123 45

Ali 345 67

Chong 432 78

Raja 657 76

Stanley 765 80



Total marks are _____

Average marks are _____





coding yg baru slesai:


Quote:





#include

main()

{ struct Result

{ char name[10];

long id;

double marks;

int total;

}

group[5];



for(int i=0;igroup[i].name;

cout>group[i].id;

cout>group[i].marks;

cout

Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


 


All times are GMT +7. The time now is 02:31 AM.


no new posts