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
JagoVB JagoVB is offline
Ceriwiser
 
Join Date: Nov 2011
Posts: 508
Rep Power: 15
JagoVB mempunyai hidup yang Normal
Default [HELP] Tolong cekin kodingan ane please

Gan, ane abis nyoba2 ngoding pake bahasa C, tapi hasilnya aneh... Dibawah ane lampirin source code yang ane bikin... mungkin agan2 ada yang bisa memperbaiki sedikit kesalahan ane...



<div style="margin:20px; margin-top:5px">
Code:

#include
#include
#include
#include

void gotoxy(int x, int y)
{
COORD point;
point.X = x;
point.Y = y;
SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_H ANDLE), point);
}

void main()
{
int select,count;
char nama[50][50], avg[50][50], play[50][50], file[50][100];
FILE *in;
FILE *out;

do
{
system("cls");
printf("Score Record DotA Player\n========================\n1. View Player\n2. Add player record\n3. Add new player\n4. Delete player\n5. Save and Exit\n\n");
do
{
printf("Your choice : ");scanf("%d",&select);fflush(stdin);
}
while(select5);
switch(select)
{
case 1:
system("cls");
printf(" Player Name");gotoxy(18,0);printf("| Average Score");gotoxy(36,0);printf("| Number of Playing\n");
printf("========== =============\n");
count=0;
out=fopen("soal09.txt","r");
while(feof(out))
{
fgets(file[count],100,out);
fgetc(out);
strcpy(nama[count],strtok(file[count]," "));
strcpy(avg[count],strtok(NULL," "));
strcpy(play[count],strtok(NULL," "));
count++;
printf(" %s",nama[count]);gotoxy(18,count+2);printf("| %s",avg[count]);gotoxy(36,count+2);printf("| %s",play[count]);
}
fclose(out);
printf("Press ENTER to continue...");
getchar();
break;
}
}
while(select>=1&&select
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


Terkait
Thread Thread Starter Forum Replies Last Post
(tolong dong gan:SERIUS) minta tolong kpd kaskuser&quot; yg baik hati peramal123 Misteri, Horror, Supranatural 0 22nd April 2012 07:11 PM
apa langkah selanjutnya kalo kodingan kita sukses Darkc0der Programming 1 20th November 2011 11:04 PM
[ask] gan bantuin buat kodingan gan Darkc0der Programming 0 20th November 2011 09:40 AM
[ASK][help]tolong koreksiin kodingan c Braincode Programming 0 11th November 2011 01:13 PM

 


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