Download - Mini Projek
ACKNOWLEDGEMENT
Assalamualaikum.. I want to say gratefully to god and acknowledgement to all person which
helped me executed this assignment. I confront any problem challenge and barricade for
execute this assignment with good and completed. So long as I received execute with good and
complete helped and supported from any person. At this point I want say appreciate thanks
very much to for they which before this time more helped and give cooperation for me in
executed this assignment. With helped and supported participate to learn and supported from
my family especially my father and my mother. Beside also, thank very much for my lecturer
Madam Nurul Zakiah Binti Kasnun until thing produced this assignment and learn to me along
this semester. Once in a while I want to thanks very much which help me in executed this
assignment.
Thanks you.
PROGRAM TITLE Coding for used the topup machine.
INTRODUCTION OF PROGRAM
Purpose
To describe to a problem and information for user to used the topup machine.
A problem that the will get types of topup. Then, the program will display the type of
topup.
Input: types of topup
Process: -
Output: types of topup
METHOD OF PROGRAM DESIGN-FLOW CHART
True False
‘ True False
True False
True False
PROGRAM CODE
START
1:Celcom,2:Maxis,3:Digi,4:U-mobile
Types==1
Output “Celcom”
Types==2
Output “Maxis”
Types==3
Output “ Digi ” Types==4
Output “U-mobile”
Output “not on the list of types of topup
END
#include<stdio.h>
void main()
{
int topup,types;
for(int com=4;com!=0;)
{
printf("please enter types of company ");
printf("\n1=celcom\n2=maxis\n3=digi\n4=u-mobile\n");
scanf("%d",&types);
if(types==1)
{
printf("\ncelcom");
printf("\nvalue of topup :");
scanf("%d",&topup);
}
else if(types==2)
{
printf("\nmaxis");
printf("\nvalue of topup :");
scanf("%d",&topup);
}
else if(types==3)
{
printf("\ndigi");
printf("\nvalue of topup :");
scanf("%d",&topup);
}
else if(types==4)
{
printf("\nu-mobile");
printf("\nvalue of topup :");
scanf("%d",&topup);
}
else
printf("\nnot on the list of types of topup\n");
printf("\nto stop press 0 and to continue press any number\n");
scanf("%d",&com);
}
REFERENCE
Programming fundamentals module
Programming fundamentals lab