Kamis, Agustus 25

ALGORITMA DAN PEMOGRAMAN

/*Program Nilai*/
#include
#include
main()
{
float q,m,s,a;
char bp[13],nm[20];
clrscr();
printf("Program Nilai Mahasiswa\n");
printf("Input Nomor BP :");scanf("%s",&bp);
printf("Input Nama :");scanf("%s",&nm);

printf("Input Nilai Quis :");scanf("%f",&q);
printf("Input Nilai Mid :");scanf("%f",&m);
printf("Input Nilai Semester:");scanf("%f",&s);
a=0.1*q+0.4*m+0.5*s;
printf("nilai akhir : %5.1f\n" ,a);
getch();
}





#include
#include
#include
main()
{
float ut,kd,na;
char nu[13],nm[20],ket[10];
clrscr();
printf("Data Nilai Peserta Test\n");
printf("Input Nomor ujian:");scanf("%s",&nu);
printf("Input Nama:");scanf("%s",&nm);
printf("Input Nilai Uptitude Test:");scanf("%f",&ut);
printf("Input Nilai Kemampuan Dasar:");scanf("%f",&kd);
na=0.6*ut+0.4*kd;
if(na>=60)
{
strcpy(ket,"Lulus");
}
else
strcpy(ket,"Tidak Lulus");
printf("Keterangan : %s\n" ,ket);
getch();
}





/* Program Entry Data Nasabah */
#include
#include
#include
main ()
{
char kn[5][50];
char nm[20][50];
char tr[4][50];
long int um[50],h;
int la[50];
char adl='Y';
int jd =0,x,baris;
float ap,b,ja;
while((adl=='Y'||adl=='Y')&&jd<50)
{
clrscr();
gotoxy(30,10);printf(" ENTRY DATA NASABAH ");
gotoxy(30,11);printf("============================");
gotoxy(25,12);printf("Kode Nasabah :");gets(kn[jd]);
gotoxy(25,13);printf("Nama Nasabah :");gets(nm[jd]);
gotoxy(25,14);printf("Type Rumah :");scanf("%s",&tr[jd]);
gotoxy(25,15);printf("Uang Muka :");scanf("%li",&um[jd]);
gotoxy(25,16);printf("Lama Angsuran :");scanf("%i",&la[jd]);fflush(stdin);
jd++;
gotoxy(25,17);printf("Tambah Data [Y/T]?");scanf("%c",&adl);fflush(stdin);
}

clrscr();
gotoxy(30,1);printf("LAPORAN DATA NASABAH KREDIT PERUMAHAN");
gotoxy(45,2);printf("Angkasa Jaya");
gotoxy(1,3);printf ("--------------------------------------------------------------------------");
gotoxy(1,4);printf ("|No| Kode |Nama Nasabah| Type | Harga | Uang | Lama | Jumlah |");
gotoxy(1,5);printf ("| |Nasabah| | Rumah | | Muka |Angsuran|Angsuran|");
gotoxy(1,7);printf ("--------------------------------------------------------------------------");
/*12345678901234567890123456789012345678901234567890123456789012345678901234*/
/*1 4 12 33 39 48 59 68 79*/
baris=8;
for(x=0;x

Tidak ada komentar:

Posting Komentar