void swtch(){ clrscr(); frame(); _setcursortype(_NOCURSOR); char c[]={" G A R A G E P A R K I N G S Y S T E M "}; for(int i=0;i5) { gotoxy(27,15);textcolor(MAGENTA);cprintf("Slot does not exist!"); getch();
}
if(park[slot-1]==0) { park[slot-1]=plate; gotoxy(25,15);textcolor(MAGENTA);cprintf("Slot was successfully occupied.."); getch(); }
else { gotoxy(27,15);textcolor(RED+BLINK);cprintf("Slot is already occupied!"); getch(); } }
void out() { int slot,plate,hours; int f,e;
gotoxy(34,6);textcolor(LIGHTBLUE);cprintf("O U T"); gotoxy(30,9);textcolor(YELLOW);cprintf("Enter slot:"); scanf("%d",&slot); gotoxy(30,11);textcolor(YELLOW);cprintf("Enter Plate #: "); scanf("%d",&plate); gotoxy(30,13);textcolor(YELLOW);cprintf("Enter hours:"); scanf("%d",&hours); gotoxy(26,21);textcolor(RED+BLINK);cprintf("Press any key to return...");
if(hours==1){ gotoxy(25,15);textcolor(YELLOW);cprintf(" Your total payment is P5.00"); scanf("%d", &f); } else if(hours>=1){ f=hours+2;
gotoxy(25,15);textcolor(YELLOW);cprintf("Your total payment is: P%d",f); } else{ gotoxy(29,16);textcolor(WHITE+BLINK);cprintf("INVALID HOURS!"); } if(slot>5) { gotoxy(28,17);textcolor(RED+BLINK);cprintf("Error! Slot not found!!"); getch(); } if(park[slot-1]==plate&&park[slot-1]!=hours) { park[slot-1]=0; gotoxy(28,18);textcolor(WHITE);cprintf("Slot is now available."); getch(); } else { gotoxy(29,19);textcolor(WHITE+BLINK);cprintf("Invalid slot..."); getch(); } }
void view() { int save;
gotoxy(28,6);textcolor(LIGHTBLUE);cprintf(" V I E W R E C O R D S"); gotoxy(26,9);textcolor(GREEN);cprintf(" SLOT PLATE # "); gotoxy(26,21);textcolor(RED+BLINK);cprintf("Press any key to return...");
void main(){ clrscr(); int day; gotoxy(28,5);textcolor(LIGHTRED);cprintf("Enter an integer:"); scanf("%d",&day);
switch(day){ case 1: gotoxy(30,10);textcolor(LIGHTGREEN+BLINK);cprintf("Sunday"); break; case 2: gotoxy(30,10);textcolor(LIGHTRED+BLINK);cprintf("Monday"); break; case 3: gotoxy(30,10);textcolor(MAGENTA+BLINK);cprintf("Tuesday"); break; case 4: gotoxy(30,10);textcolor(GREEN+BLINK);cprintf("Wednesday"); break; case 5: gotoxy(30,10);textcolor(CYAN+BLINK);cprintf("Thursday"); break; case 6: gotoxy(30,10);textcolor(YELLOW+BLINK);cprintf("Friday"); break; case 7: gotoxy(30,10);textcolor(LIGHTBLUE+BLINK);cprintf("Saturday"); break;
default: gotoxy(20,10);textcolor(RED+BLINK);cprintf("S O R R Y ! ! !Day is not available!!!!!");}
clrscr(); int x,y,z;for(x=1;x<=77;x++) { gotoxy(2+x,1);textcolor(LIGHTRED); cprintf("Í");//delay (10); gotoxy(2+x,21);textcolor(LIGHTRED); cprintf("Í");//delay (10); } for(y=1;y<=20;y++) { gotoxy(3,1+y);textcolor (LIGHTRED); cprintf("º");//delay (10);gotoxy(79,1+y);textcolor (LIGHTRED); cprintf("º");//delay (10);}gotoxy(3,1);textcolor (LIGHTRED); cprintf("É");gotoxy(3,21);textcolor (LIGHTRED); cprintf("È");gotoxy(79,1);textcolor (LIGHTRED); cprintf("»");gotoxy(79,21);textcolor (LIGHTRED); cprintf("¼"); } void menu(){nextscreen();nextscreen2 (); int choice,a,b,n,y,sum=0,sub=0,mul=0,div=0,z; gotoxy (26,6);textcolor(LIGHTRED); cprintf("\nSelect operation:"); gotoxy(25,8);textcolor(LIGHTGREEN); cprintf("\n\t[A] for ADDITION"); gotoxy (25,9);textcolor(LIGHTGREEN); cprintf("\n\t[B] for SUBTRACTION"); gotoxy(25,10);textcolor (LIGHTGREEN); cprintf("\n\t[C] for MULTIPLICATION"); gotoxy(25,11);textcolor(LIGHTGREEN); cprintf("\n\t[D] for DIVISION"); gotoxy (25,12);textcolor(LIGHTGREEN); cprintf("\n\t[E] for EXIT"); gotoxy(25,14);textcolor(LIGHTGREEN); cprintf("\nEnter choice here:");scanf("%s",&choice);switch(choice) {case 'A': clrscr(); nextscreen();nextscreen2(); gotoxy(35,5);textcolor(RED); cprintf ("A] A D D I T I O N"); gotoxy(25,7);textcolor(LIGHTRED); cprintf ("Enter number:");scanf("%d",&a); gotoxy(25,8); textcolor (LIGHTRED); cprintf("Enter another number:"); scanf("% d",&b); sum=a+b; gotoxy(25,10);textcolor (LIGHTGREEN+BLINK); cprintf("Sum of two number is: % d",sum); gotoxy(25,14);textcolor(LIGHTBLUE); cprintf("Do you want to try again,y/n?"); scanf("%s",&z);menu();getch();break; } switch(choice) {case 'B': clrscr();nextscreen();nextscreen2 (); gotoxy(35,5);textcolor(YELLOW); cprintf("B] S U B T R A C T I O N"); gotoxy(25,7);textcolor(LIGHTRED); cprintf("Enter number:");scanf("%d",&a); gotoxy(25,8);textcolor (LIGHTRED); cprintf("Enter another number:");scanf("% d",&b);sub=a-b;gotoxy(25,10); textcolor(YELLOW+BLINK); cprintf ("DIFFERENCE of two number is: %d",sub); gotoxy (25,14);textcolor(LIGHTBLUE); cprintf("Do you want to try again,y/n?"); scanf("%s",&z);menu();getch();break; } switch(choice) {case 'C': clrscr();nextscreen();nextscreen2();gotoxy (35,5);textcolor(YELLOW); cprintf("C] M U L T I P L I C A T I O N"); gotoxy(25,7);textcolor(LIGHTRED); cprintf("Enter number:"); scanf("%d",&a); gotoxy(25,8);textcolor (LIGHTRED); cprintf("Enter another number:"); scanf("% d",&b);mul=a*b; gotoxy(25,10);textcolor(YELLOW+BLINK); cprintf ("PRODUCT of two number is: %d",mul); gotoxy(25,14);textcolor(GREEN); cprintf("Do you want to try again,y/n?"); scanf("% s",&z);menu();getch();break; } switch(choice) { case 'D': clrscr();nextscreen();nextscreen2 (); gotoxy(35,5);textcolor(YELLOW); cprintf("D] D I V I S I O N"); gotoxy(25,7);textcolor(LIGHTRED); cprintf("Enter number:");scanf("%d",&a); gotoxy(25,8);textcolor (LIGHTRED); cprintf("Enter another number:"); scanf("% d",&b);div=a/b;gotoxy(25,10);textcolor(YELLOW+BLINK); cprintf ("QOUTIENT of two number is: %d",div); gotoxy(25,14);textcolor (LIGHTGREEN); cprintf("Do you want to try again,y/n?"); scanf("% s",&z);menu();getch();break; } switch(choice) { case'E': gotoxy(15,18);textcolor(LIGHTCYAN); cprintf("\n\nThe program ends here.. THANK YOU!"); } } void nextscreen2(){clrscr();int a,b,x,y,z;for(x=1;x<=77;x++){ gotoxy(2+x,1); textcolor(LIGHTCYAN); cprintf ("Í");gotoxy(2+x,21);textcolor(LIGHTCYAN); cprintf("Í");}for (y=1;y<=20;y++){ gotoxy(3,1+y);textcolor(LIGHTCYAN); cprintf ("º");gotoxy(79,1+y);textcolor(LIGHTCYAN); cprintf("º");}gotoxy (3,1);textcolor(LIGHTCYAN); cprintf("É");gotoxy(3,21);textcolor (LIGHTCYAN); cprintf("È");gotoxy(79,1);textcolor (LIGHTCYAN); cprintf("»");gotoxy(79,21);textcolor (LIGHTCYAN); cprintf("¼");for(a=1;a<=49;a++){ gotoxy (15+a,4);textcolor (LIGHTCYAN); cprintf("ß");gotoxy (15+a,17);textcolor(LIGHTCYAN); cprintf("Ü");}for (b=1;b<=14;b++){ gotoxy(16,3+b);textcolor(LIGHTCYAN); cprintf ("°");gotoxy(65,3+b);textcolor(LIGHTCYAN); cprintf("° ");} } void main(){clrscr();nextscreen();nextscreen2();menu(); getch(); }
int num1,num2,ans; int operation; void main(){ clrscr(); gotoxy(20,5); printf("W\tE\tL\tC\tO\tM\tE"); gotoxy(30,7);textcolor(WHITE);cprintf("Enter Number 1:"); scanf("%d",&num1); gotoxy(30,8);textcolor(WHITE);cprintf("Enter Number 2:"); scanf("%d",&num2); printf("\t\tA.) Addition \n"); printf("\t\tB.) Subtraction \n"); printf("\t\tC.) Multiplication \n"); printf("\t\tD.) Division \n"); printf(\n\t\t"Enter a Number above for the Operation: ",operation); scanf("%sd",&operation);
switch(operation) { case 'A': case 'a':
ans=num1+num2; gotoxy(30,16);textcolor(WHITE);cprintf("The Answer is: %d",ans); break;
case 'B': case 'b':
ans=num1-num2; gotoxy(30,16);textcolor(WHITE);cprintf("The Answer is: %d",ans); break;
case 'C': case 'c':
ans=num1*num2; gotoxy(30,16);textcolor(WHITE);cprintf("The Answer is: %d",ans); break;
case 'D': case 'd':
ans=num1/num2; gotoxy(30,16);textcolor(WHITE);cprintf("The Answer is: %d",ans); break;
printf("\t\t\tA U T O B I O G R A P H Y\n\n\n\n"); printf("\t\tHajimimashite! I'm Sybel Joy S. Norcos. "); printf("I'm 16 years of age and I live in Matina, Davao City. "); printf("Currently, I'm studying in the University of Mindanao "); printf("on the first year of my Computer Science course.\n"); printf("\t\tI have a kind mother whose name is Letty S. Norcos "); printf("and i have this caring father Ramil A. Maganase, "); printf("and I'm their only sibling. "); printf("I knew that you'll notice something's different there, just don't mind it. >^_^< "); printf("I'm happy that God gave me chance to live in this world, and also I'm thankful for "); printf("the one who is reading this little piece of my life...\n\n"); printf("God Bless You Always.");
void main() { clrscr(); float grade,average,sum; int a=0;
while(grade!=-1) { sum=sum+grade; printf("\n\n"); printf("\nEnter grade; -1 to exit"); scanf("%f",&grade);
if(grade==-1) {printf("\n\n\n\t\t\t"); printf("\n\t\t\tAverage is %.2f\n",average=sum/a);} a++; } if(average>=95 && average<=100){ printf("\n\nRated of this average: A");} else if(average>=90 && average<=94){ printf("\n\nRated of this average: B");} else if(average>=89 && average<=90){ printf("\n\nRated of this average: C");} getch(); }
Information Integrity in Pharma Industry
-
During administrative reviews, information uprightness is quite possibly
the most well-known issues. In certain cases, basic information is changed
or c...
Gradle
-
Gradle is a build automation system. It integrates with maven repository
for dependencies. It has its own DSL which is more concise than XML, for
writing y...
Exer2
-
#include
#include
void main()
{
clrscr();
gotoxy(10,7);
printf("I am Mae Juarez Cervantes. I am 17 years of age.\n I was born on
May 11, 1991 in the bea...
-
#include
#include
void main(){
clrscr();
int day;
printf("Enter an integer:");
scanf("%d",&day);
switch(day){
case 1:
printf("Sunday");
break;
case 2:
pri...
"My Experience in Prelim"
-
In my first day in prelim, i feel so nervous, because im shy of facing new
faces and affraid that i cannot meet friends..But it is verry exciting,
because ...