ElectronicKong
Honorary Poster
Mga Demi-god ng programming Help.
di ko mapagana, at malapit ko na isisi sa computer ko kung bakit ayaw gumana.
paki silip
kung ano mali
kungano kulang
kung ano sobra
-------------------------------------------------------------------------------------------------------
#include<stdio.h>
#include<conio.h>
#include<string.h>
#define p printf
#define s scanf
#define c clrscr()
#define g gotoxy
main(){
char un[50],pw[50],nam[50],yn[50],chequeno[100],custid[50];
int qnty,pt;
float pr,tp,vat,tb,cash,cha;
li:
c;
g(25,7);p("--------------------");
g(25,8);p(" LOGIN SCREEN ");
g(25,9);p("--------------------");
g(25,10);p("Enter User Name: ");
g(25,11);p("Enter Password: ");
g(41,10);gets(un);
g(41,11);gets(pw);
if (!strcmp(un,"user")==0 || !strcmp(pw,"act")==0){
goto li;
}
tranx:
c;
g(1,1);p("Enter customer ID: ");
g(1,2);p("Enter Customer Name: ");
g(1,4);p("Custome Order Slip Form");
g(1,5);p("product ID Product Description Unit Price ");
g(1,6);p(" 111 tablet 5000 ");
g(1,7);p(" 222 laptop 10000 ");
g(1,8);p(" 333 vr 500 ");
g(1,6);p(" Enter Product ID to Purchase The Item: [Payment Option]");
g(1,14);p("Enter Number of Item to be Purchase: 1] Cash");
g(1,15);p(" TOTAL UNIT SALE : 2] CHEQUE");
g(1,16);p(" TOTAL VAT SALE : 3]CREDIT");
g(1,17);p(" ---------");
g(1,19);p(" TOTAL AMOUNT CHARGE : ENTER PAYMENT TYPE [ ]");
g(1,20);p(" ENTER AMOUNT TENDERD : ");
g(24,13);gets(custid);
g(24,14);gets(nam);
codepo:
g(40,13);p(" ");
g(40,13);gets(codepo);
if (strcmp(code,"111")==0){
tp=5000;
goto quantity;
}
else if (strcmp(code,"222")==0){
tp= 10000;
goto quantity;
}
else if (strcmp(code,"333")==0){
tp =500;
}
else{goto codepo:}
quantity:
g(40,14);s("%d",&qnty);
tp=qnty*tp;
g(40,15);p("%.2f",tp);
vat=tp*.12;
g(40(,16);p("%.2f",vat);
tb=vat+tp;
g(40,19);printf("%.2f",tb);
paytype:
g(75,19);p(" ] ");
g(75,19);s("%d",tp,);
if (pt==1){
cash:
g(39,20);p(" ");
g(17,20);p("Enter Amount Tenderd: ");
g(14,19);s("%f,&cash);
if (cash<tb){
goto cash;
}
cha=cash-tb;
g(30,22);p("The Change is %.2f",cha);
g(30,23);p("another Transction? [Y/N]: ");
g(30,24);gets(yn);
if (Strcmp(yn,"Y")==0 || strmp(yn,"y")==0{
goto tranx;
}
else if(strcmp(yn,"N")==0 || strcmp(yn,"y")==0{
goto bye;
}
else{
goto ano ;
}
}
else if "(pt==2){
g(30,22);p("Enter Cheque Number: ";gets(chequeno);
g(33,23);p("Transaction Done!");
goto ano;
}
else if (pt==3){
g(33,22);p("Transaction Done!');
goto ano;
}
else{
goto paytype;
}
bye:
c;
g(25,13);p("THANK YOU FOR USING THE PROGRAM!");
getch();
}
getch();
-------------------------------------------------------------------------------------------------------------------------------
THANKNYOU
di ko mapagana, at malapit ko na isisi sa computer ko kung bakit ayaw gumana.
paki silip
kung ano mali
kungano kulang
kung ano sobra
-------------------------------------------------------------------------------------------------------
#include<stdio.h>
#include<conio.h>
#include<string.h>
#define p printf
#define s scanf
#define c clrscr()
#define g gotoxy
main(){
char un[50],pw[50],nam[50],yn[50],chequeno[100],custid[50];
int qnty,pt;
float pr,tp,vat,tb,cash,cha;
li:
c;
g(25,7);p("--------------------");
g(25,8);p(" LOGIN SCREEN ");
g(25,9);p("--------------------");
g(25,10);p("Enter User Name: ");
g(25,11);p("Enter Password: ");
g(41,10);gets(un);
g(41,11);gets(pw);
if (!strcmp(un,"user")==0 || !strcmp(pw,"act")==0){
goto li;
}
tranx:
c;
g(1,1);p("Enter customer ID: ");
g(1,2);p("Enter Customer Name: ");
g(1,4);p("Custome Order Slip Form");
g(1,5);p("product ID Product Description Unit Price ");
g(1,6);p(" 111 tablet 5000 ");
g(1,7);p(" 222 laptop 10000 ");
g(1,8);p(" 333 vr 500 ");
g(1,6);p(" Enter Product ID to Purchase The Item: [Payment Option]");
g(1,14);p("Enter Number of Item to be Purchase: 1] Cash");
g(1,15);p(" TOTAL UNIT SALE : 2] CHEQUE");
g(1,16);p(" TOTAL VAT SALE : 3]CREDIT");
g(1,17);p(" ---------");
g(1,19);p(" TOTAL AMOUNT CHARGE : ENTER PAYMENT TYPE [ ]");
g(1,20);p(" ENTER AMOUNT TENDERD : ");
g(24,13);gets(custid);
g(24,14);gets(nam);
codepo:
g(40,13);p(" ");
g(40,13);gets(codepo);
if (strcmp(code,"111")==0){
tp=5000;
goto quantity;
}
else if (strcmp(code,"222")==0){
tp= 10000;
goto quantity;
}
else if (strcmp(code,"333")==0){
tp =500;
}
else{goto codepo:}
quantity:
g(40,14);s("%d",&qnty);
tp=qnty*tp;
g(40,15);p("%.2f",tp);
vat=tp*.12;
g(40(,16);p("%.2f",vat);
tb=vat+tp;
g(40,19);printf("%.2f",tb);
paytype:
g(75,19);p(" ] ");
g(75,19);s("%d",tp,);
if (pt==1){
cash:
g(39,20);p(" ");
g(17,20);p("Enter Amount Tenderd: ");
g(14,19);s("%f,&cash);
if (cash<tb){
goto cash;
}
cha=cash-tb;
g(30,22);p("The Change is %.2f",cha);
g(30,23);p("another Transction? [Y/N]: ");
g(30,24);gets(yn);
if (Strcmp(yn,"Y")==0 || strmp(yn,"y")==0{
goto tranx;
}
else if(strcmp(yn,"N")==0 || strcmp(yn,"y")==0{
goto bye;
}
else{
goto ano ;
}
}
else if "(pt==2){
g(30,22);p("Enter Cheque Number: ";gets(chequeno);
g(33,23);p("Transaction Done!");
goto ano;
}
else if (pt==3){
g(33,22);p("Transaction Done!');
goto ano;
}
else{
goto paytype;
}
bye:
c;
g(25,13);p("THANK YOU FOR USING THE PROGRAM!");
getch();
}
getch();
-------------------------------------------------------------------------------------------------------------------------------
THANKNYOU