Map

Translate

English French German Spain Italian Dutch

Russian Brazil Japanese Korean Arabic Chinese Simplified
Translate by Google ( UBLO 7 )

visitor

Flag Counter

About Me

PROGRAM ARRAY 2D (C++)

CODE :
#include <stdio.h>
#include <conio.h>
void main(){
int data_lulus[2][3];
int tahun, negara;
printf("Nama : Beny");
printf("\nNim  : 13.141.198N");
printf("\n\n---------------------------------");
printf("\n|  Negara  |  Jumlah Yang Lulus |");
printf("\n---------------------------------");
printf("\n|Indonesia |  48  |  50  |  90  |");
printf("\n|Malaysia  |  50  |  55  |  75  |");
printf("\n---------------------------------");
printf("\n|  Tahun   | 2012 | 2013 | 2014 |");
printf("\n---------------------------------");
data_lulus[0][0]=48;
data_lulus[0][1]=50;
data_lulus[0][2]=90;
data_lulus[1][0]=50;
data_lulus[1][1]=55;
data_lulus[1][2]=75;
while(1){
printf("\n\nNegara (0:Indonesia, 1:Malaysia) : ");scanf("%d",&negara);
if((negara==0)||(negara==1));break;}
while(1)
{printf("Tahun (2012-2014): ");scanf("%d",&tahun);
if((tahun>=2012)&&(tahun<=2014))
{tahun=tahun-2012;break;}}
printf("Jumlah Yang Lulus= %d",data_lulus[negara][tahun]);
getch();}


HASIL :













0 komentar:

Posting Komentar

Jam

Pesan

Salju