Symbianize Forum

Most of our features and services are available only to members, so we encourage you to login or register a new account. Registration is free, fast and simple. You only need to provide a valid email. Being a member you'll gain access to all member forums and features, post a message to ask question or provide answer, and share or find resources related to mobile phones, tablets, computers, game consoles, and multimedia.

All that and more, so what are you waiting for, click the register button and join us now! Ito ang website na ginawa ng pinoy para sa pinoy!

All about programming (Specially c, c++, VB, Java)

Code:
#include<iostream>
#include<math.h>
#include<string.h>
#include<windows.h>
#include<conio.h>
#include<stdio.h>
using namespace std;

int sem;
char ay[10];
int campus;
char lname[10];
char gname[20];
char mname[10];
char course[30];
char subject[10];
char days[10];
char time[10];
char room[10];
int midterm;
int finals;
float average;


void gotoxy (int x,int y)
{
	HANDLE hConsoleOutput;
	COORD dwCursorPosition;
cout.flush();
	dwCursorPosition.X=x;
	dwCursorPosition.Y=y;
hConsoleOutput=GetStdHandle(STD_OUTPUT_HANDLE);
	SetConsoleCursorPosition(hConsoleOutput,dwCursorPosition);
}



void main()
{

	gotoxy(10,2); cout<<"BATAAN PENINSULA STATE UNIVERSITY";
	gotoxy(5,3);cout<<"choose: 1.Main 2.Balanga 3.Abucay 4.Orani 5.Dinalupihan";
	gotoxy(5,4);cout<<"Campus:";
	cin>>campus;
	gotoxy(5,5);cout<<"AY:";
	cin>>ay;
	gotoxy(5,6);cout<<"choose: 1.1st 2.2nd 3.Summer";
	gotoxy(5,7);cout<<"Semester:";
	cin>>sem;
	gotoxy(5,8);cout<<"Last Name:";
	cin>>lname;
	gotoxy(5,9);cout<<"Given Name:";
	cin>>gname;
	gotoxy(5,10);cout<<"Middle Name:";
	cin>>mname;
	gotoxy(5,11);cout<<"Course & Major:";
	cin>>course;
	gotoxy(5,12);cout<<"Subject:";
	cin>>subject;
	gotoxy(5,13);cout<<"Days:";
	cin>>days;
	gotoxy(5,14);cout<<"Time:";
	cin>>time;
	gotoxy(5,15);cout<<"Room:";
	cin>>room;
	gotoxy(5,16);cout<<"Midterm:";
	cin>>midterm;
	gotoxy(5,17);cout<<"Finals:";
	cin>>finals;

	average=(midterm+finals)/2;


	system("cls");

gotoxy(5,1);cout<<"ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿";
gotoxy(5,2);cout<<"³                                                               ENROLLED  ³";
gotoxy(5,3);cout<<"³ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿³";
gotoxy(5,4);cout<<"³³                                                                       ³³";
gotoxy(5,5);cout<<"³³                    BATAAN PENINSULA STATE UNIVERSITY                  ³³";
gotoxy(5,6);cout<<"³³                City of Balanga 2100 Bataan, Philippines               ³³";
	{
	if(campus==1)
	{gotoxy(5,7);cout<< "³³          xMain     Balanga     Abucay     Orani     Dinalupihan	      ³³"<<endl;}

	if(campus==2)
	{gotoxy(5,7);cout<< "³³           Main    xBalanga     Abucay     Orani     Dinalupihan	      ³³"<<endl;}

	if(campus==3)
	{gotoxy(5,7);cout<< "³³           Main     Balanga    xAbucay     Orani     Dinalupihan	      ³³"<<endl;}

	if(campus==4)
	{gotoxy(5,7);cout<< "³³           Main     Balanga     Abucay    xOrani     Dinalupihan	      ³³"<<endl;}

	if(campus==5)
	{gotoxy(5,7);cout<< "³³           Main     Balanga     Abucay     Orani    xDinalupihan	      ³³"<<endl;}

	}
	{
	if(sem==1)
	{gotoxy(5,8);cout<< "³³                    AY "<<ay<<"  x1st   2nd   Summer\t\t      ³³"<<endl;}
	
	if(sem==2)
	{gotoxy(5,8);cout<< "³³                    AY "<<ay<<"   1st  x2nd   Summer\t\t      ³³"<<endl;}
	
	if(sem==3)
	{gotoxy(5,8);cout<< "³³                    AY "<<ay<<"   1st   2nd  xSummer\t\t      ³³"<<endl;}
	}

	gotoxy(5,9);cout<<"³³\t\t\t\t\t\t\t\t\t      ³³"<<endl;
	gotoxy(5,10);cout<<"³³                               CLASS CARD							³³"<<endl;
	gotoxy(5,11);cout<<"³³   Name          "<<lname<<"    \t   "<<gname<<"           \t"<<mname<<"  \t   ³³"<<endl;
	gotoxy(5,12);cout<<"³³          PRINT  (Last Name)       (Given Name)       (Middle Name)    ³³"<<endl;
	gotoxy(5,13);cout<<"³³   Course & Major "<<course<<"					              ³³"<<endl;
	gotoxy(5,14);cout<<"³³   ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄ¿   ³³"<<endl;
	gotoxy(5,15);cout<<"³³   ³       Subject       ³     Days     ³    Time     ³    Room    ³   ³³"<<endl;
	gotoxy(5,16);cout<<"³³   ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄ´   ³³"<<endl;
	gotoxy(5,17);cout<<"³³   ³ "<<subject<<"                   ³ "<<days<<"	       ³ "<<time<<"	     ³ "<<room<<"	  ³   ³³"<<endl;
	gotoxy(5,18);cout<<"³³   ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÙ   ³³"<<endl;

	{
	if(average>=98&&average<=100)
	{gotoxy(5,19);cout<<"³³   FINALS GRADE   1.00 \t\t\tREMARKS  PASSED\t\t      ³³"<<endl;}
	
	if(average>=95&&average<=97)
	{gotoxy(5,19);cout<<"³³   FINALS GRADE   1.25 \t\t\tREMARKS  PASSED\t\t      ³³"<<endl;}
	
	if(average>=93&&average<=94)
	{gotoxy(5,19);cout<<"³³   FINALS GRADE   1.50 \t\t\tREMARKS  PASSED\t\t      ³³"<<endl;}
	
	if(average>=89&&average<=91)
	{gotoxy(5,19);cout<<"³³   FINALS GRADE   1.75 \t\t\tREMARKS  PASSED\t\t      ³³"<<endl;}
	
	if(average>=86&&average<=88)
	{gotoxy(5,19);cout<<"³³   FINALS GRADE   2.00 \t\t\tREMARKS  PASSED\t\t      ³³"<<endl;}
		
	if(average>=83&&average<=85)
	{gotoxy(5,19);cout<<"³³   FINALS GRADE   2.25 \t\t\tREMARKS  PASSED\t\t      ³³"<<endl;}
	
	if(average>=80&&average<=82)
	{gotoxy(5,19);cout<<"³³   FINALS GRADE   2.50 \t\t\tREMARKS  PASSED\t\t      ³³"<<endl;}
	
	if(average>=77&&average<=79)
	{gotoxy(5,19);cout<<"³³   FINALS GRADE   2.75 \t\t\tREMARKS  PASSED\t\t      ³³"<<endl;}
	
	if(average>=75&&average<=76)
	{gotoxy(5,19);cout<<"³³   FINALS GRADE   3.00 \t\t\tREMARKS  PASSED\t\t      ³³"<<endl;}
	
	if(average<75)
	{gotoxy(5,19);cout<<"³³   FINALS GRADE   5.00 \t\t\tREMARKS  FAILED\t\t      ³³"<<endl;}
	}

gotoxy(5,20);cout<<"³³                                                                       ³³";
gotoxy(5,21);cout<<"³³        ________________________            JULIETA G. REYES           ³³";
gotoxy(5,22);cout<<"³³         INSTRUCTOR'S SIGNATURE            UNIVERSITY REGISTRAR        ³³";
gotoxy(5,23);cout<<"³³   NOTE: Present this to your instructor on the first day of classes.  ³³";
gotoxy(5,24);cout<<"³ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ³";
gotoxy(5,25);cout<<"ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ";



}

sir help naman kasi pag nag iinput ako na aadujst ung mga border nya panu po ba gawin na pag nag input ako d uusog ung mga border nya? thanks in advance!
v c++ 6.0 compiler gmit ko un kac pnapagmit sa school nman haggang naun T
 
pahelp nmn po s vb.net..kung pano gawin ung s form n maximize...kpg kc naset mu n maximize..eh ung immaximize lng nya ung form lng nde ksma ung mga laman nun..tnx
 
mga boss, I have a problem sa library system na ginagawa ko.. di ko kasi lam kung papano mavview ung mga available books... hindi dapat kasama ung mga borrowed books.. pano po coding nun?
 
pa help nman.. snake game po in turbo c++

e2 po ung instruction.
simple lng isang box lng .
4 na **** mas mganda kung may ulo ung snake.
tapos have 3 life.
thanks ^^
 
tol meron kaba eclipse...paki lagay naman plz para ma dl ko hehe
 
Hi amigo! I wonder if you can try this. This is about an alarm using the timer in Turbo C. You'll be ask to enter the time you would like an alarm to sound, and when the system time hits your desired time, then the alarm shouts. I would really appreciate this one, thank you!
 
boss.. anong code ang gamit mo pag sa turbo c mag coconnect ka sa isang database..?
 
182928_137424249658636_100001731851750_222596_5030427_n.jpg


TL panu po to sa Vb.6.0:weep:
 
sir need help po...
bout c++ kelangan lang po talaga...
source code naman ng atm machine oh?
simula pagpasuk po nung card, pagprint ng resibo, paglabas nung pera, buttons nya, hanggang sa paglabas nung card po.
in short ung program po mismo ng atm machine.:help::praise:
kelangan lang po talaga kasi sa studies.
ASAP po...
thank you po in advance...
 
mga master pa help naman po... ndi aq makapag decide if anong system na based ang maganda pa help naman po
 
sir may tanong po ako.. ganito ung situation pinahihingi mo ng number na input ung user kaso hindi number ang na input ng user kundi letters..pano po ba para may lalabas na notification sa user na error ung input nya tapos ipapa input na naman uli ung user..sakin po kasi nag stop lang ung program ko tapos di na pde maka input ung user keilangan mo pa e run uli ung program...
 
,.ahm,.sino na puh naka pag'exam na dito xa NC4?
,.hingi lang puh ng tips,.tnx:pray:
 
sir need help po...
bout c++ kelangan lang po talaga...
source code naman ng atm machine oh?
simula pagpasuk po nung card, pagprint ng resibo, paglabas nung pera, buttons nya, hanggang sa paglabas nung card po.
in short ung program po mismo ng atm machine.:help::praise:
kelangan lang po talaga kasi sa studies.
ASAP po...
thank you po in advance...

try this sir. gumagana yan paki edit nlng

#include<stdio.h>
#include<conio.h>
#include<dos.h>


main() /*main program starts here ^_^*/
{
char go,choice1,choice2,exit_choice,deposit,withdraw;
int t=0,amt_deposit,amt_withdraw,x;
float pin,i_pin,balance=100000;


clrscr();
gotoxy(28,8);
printf("-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-");
gotoxy(28,9);
printf("-=ATM namen=-");
gotoxy(28,10);
printf("-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-");
gotoxy(31,12);
printf("Please Insert Your Card...");
gotoxy(7,15);
printf("\t ATM 1f g1: 2010-2011 Finals Project I.T.-TC");
printf("\n\t\t Presented to Ms. jane suarez");
delay(3000);
gotoxy(23,12);
printf("Card Detected. Verifying Your Card. Please Wait...");
delay(3000);


introduction: /*intro*/
clrscr();
gotoxy (28,10); printf("[1] To Enter Pin");
gotoxy (28,12); printf("[2] To Exit.");
gotoxy(26,20);
printf("Please Select An Option.");
go=getche();

switch(go)
{
case'1':
{
clrscr();
gotoxy(35,12);printf("Enter Pin:");
scanf("%f",&i_pin);
goto insert_pin;
}
{
case'2':
{
clrscr();
goto exit;
}
}
default:
gotoxy(16,20);
printf("Sorry, But You Have Entered An Invalid Choice!");
gotoxy(30,21);
printf("Please Try Again...");
getch();
goto introduction;
}


insert_pin: /*pincode*/

pin=72610;

{
if(i_pin==pin)
{
clrscr();
gotoxy(30,12);
printf("PIN accepted...");
delay(2000);
gotoxy(18,14);
printf("Accessing Your Account. Please Wait...");
delay(2000);
goto menu;
}
else
{
t=t+1;
gotoxy(23,12);
printf("Invalid PIN!Please try Again...");
gotoxy(25,14);
printf("Press any key to continue...");
}
if (t<3)
{
getch();
goto introduction;
}
else
{
clrscr();
gotoxy(17,10);
printf("You have reached the maximum of 3 pin attempts.");
printf("\n\n\t\t Your Account has been blocked for safety.");
printf("\n\n\t\t Please contact the ATM technical support team.");
printf("\n\n\t\t Via CP: 09062460929...");
delay(5000);
goto exit;
}

}

menu: /*selecting choices here ^_^*/

{
clrscr();
gotoxy(28,7);
printf("Types Of Transaction Available:");
gotoxy(28,9);
printf("[1]Cash Deposit");
gotoxy(28,11);
printf("[2]Cash Withdraw");
gotoxy(28,13);
printf("[3]Balance Inquiry");
gotoxy(28,15);
printf("[4]Exit");
gotoxy(28,17);
gotoxy(26,20);
printf("Please Select An Option.");
choice1=getche();

switch(choice1)
{
case'1':
{
menu_deposit: /*deposit*/
clrscr();
gotoxy (28,8); printf("[1] To Enter Amount of Deposit.");
gotoxy (28,10); printf("[2] To Cancel.");
gotoxy (28,15); printf("Note: You Can Only Deposit Amount \n\t\t\t\t That Is Divisible by 100.");
gotoxy (28,17); printf("Maximum of P30,000.00 per deposit.");
gotoxy(26,20);
printf("Please Select An Option...");
deposit=getche();

switch (deposit)
{
case '1':
{
clrscr();
gotoxy(34,8);
printf("Transaction: Deposit");
gotoxy(22,10);
printf("How Much Would You Like To Deposit?");
gotoxy(22,11);
printf("Enter Amount: P");
scanf("%d",&amt_deposit);
delay(1000);
gotoxy(22,12);
printf("Cash Deposit Detected. Please Wait...");
delay(1000);
gotoxy(22,13);
printf("Checking Deposit Amount. Please Wait...");
delay(3000);
if (amt_deposit<=30000)
if (amt_deposit%100==0)
{
balance=balance+amt_deposit;
delay(2000);
gotoxy(22,15);
printf("P%d.00 Is Added To Your Account...",amt_deposit);
delay(1000);
gotoxy(22,17);
printf("Press Any Key To Continue...");
getch();
goto menu;
}
if (amt_deposit>30000)
{
clrscr();
gotoxy(18,9);
printf("Please Make Your Sure That Your Deposit \n\t\t\tWas Divisible By 100 ");
printf("\n\t\t And Doesn't Exceed The Maximum Deposit \n\t\t\tThen Try Again");
printf("\n\n\t\t Press Any Key To Return...");
getch();
delay(2000);
goto menu_deposit;
}

else
{
clrscr();
gotoxy(18,9);
printf("Please Make Your Sure That Your Deposit \n\t\t\tWas Divisible By 100 ");
printf("\n\t\t And Doesn't Exceed The Maximum Deposit \n\t\t\tThen Try Again");
printf("\n\n\t\t Press Any Key To Return...");
getch();
delay(2000);
goto menu_deposit;
}
}
case '2':
{
goto menu;
}
default:
gotoxy(16,20);
printf("Sorry, But You Have Entered An Invalid Choice!");
gotoxy(30,21);
printf("Please Try Again...");
getch();
goto menu_deposit;
}}

case'2':
{
menu_withdraw: /*withdraw*/
clrscr();
gotoxy (28,10); printf("[1] To Enter Amount of Withdraw.");
gotoxy (28,11); printf("[2] To Withdraw Fast Cash (P500).");
gotoxy (28,12); printf("[3] To Cancel.");
gotoxy (28,15); printf("Note: You Can Only Withdraw Amount \n\t\t\t\t That Is Divisible by 100 \n");
printf("\t\t\tMaximum of P30,000.00 Per Withdrawal. ");

gotoxy(26,20);
printf("Please Select An Option.");
withdraw=getche();

switch (withdraw)
{
case'1':
{
clrscr();
gotoxy(34,8);
printf("Transaction: Withdraw");
gotoxy(22,11);
printf("How Much Would You Like To Withdraw?");
gotoxy(22,12);
printf("amount:P");
scanf("%d",&amt_withdraw);

if(amt_withdraw>balance)
{
delay(2000);
gotoxy(22,15);
printf("Sorry,You Don't Have Enough Balance In Your Account...");
getch();
goto menu_withdraw;
}
else if(amt_withdraw>30000)
{
delay(2000);
gotoxy(22,15);
printf("Withdrawal Beyond P30000.00 is not allowed.");
getch();
goto menu_withdraw;
}
if (amt_withdraw<100)
{
clrscr();
gotoxy (20,10);
printf("Make Sure That You Withdraw At Minimum of P100.00");
gotoxy (20,12);
printf("Make Sure That You Withdraw At The Maximum of P30000.00");
getch();
goto menu_withdraw;
}
if (amt_withdraw%100!=0)
{
clrscr();
gotoxy (20,10);
printf("Please Make Sure That Your Withdraw\n\t\t\t Amount Is Divisible by 100.");
getch();
goto menu_withdraw;
}
else

balance=balance-amt_withdraw;
gotoxy(22,13);
printf("Transaction in Process, Please Wait...");
delay(3000);
gotoxy(22,15);
printf("Get Your Cash And Transaction Receipt...");
delay(2000);
gotoxy(22,17);
printf("Pess Any Key To Go to Menu...");
getch();
goto menu;
}
case '2':
{
clrscr();
if(balance>500)
{
balance=balance-500;
gotoxy(22,9);
printf("Transaction In Progress...");
delay(1000);
gotoxy(22,11);
printf("Get Your Cash And Transaction Receipt.");
gotoxy(22,15);
printf("Pess Any Key To Go to Menu...");
getch();
goto menu;
}
else
{
delay(1000);
gotoxy(22,12);
printf("Sorry,You Don't Have Enough Balance in Your Account...");
getch();
goto menu_withdraw;
}
}

case '3':
{
goto menu;
}
default:
gotoxy(16,20);
printf("Sorry, But You Have Entered An Invalid Choice!");
gotoxy(30,21);
printf("Please Try Again...");
getch();
goto menu_withdraw;

}
case'3':
{ /*balance check*/
clrscr();
gotoxy(28,8);
printf("Transaction: Balance Inquiry");
gotoxy(22,11);
printf("Transaction in progress...");
delay(1000);
gotoxy(22,13);
printf("Your Account Balance:P%.2f",balance);
gotoxy(22,16);
printf("Press Any Key to Continue...");
getch();
goto menu;
}
case'4': /*extended menu*/
{
exit_menu: /*exit menu*/
clrscr();
gotoxy(28,8);
printf("Want Another Transaction?");
gotoxy(28,11);
printf("[1] Go Back to Menu.");
gotoxy(28,14);
printf("[2] Exit.");
choice2=getch();
switch(choice2)
{
case '1':
{
goto menu;
}
case '2':
{
exit_final:
clrscr();
gotoxy(28,10);
printf("Are You Sure?");
gotoxy(30,11);
printf("[1] Yes.");
gotoxy(30,12);
printf("[2] No. Return to Menu.");
exit_choice=getche();
switch(exit_choice)
{
case'1':
{clrscr();
gotoxy(25,14);
printf("Securing Your Account...");
delay(3000);
goto exit;
}
case'2':
{
goto menu;
}
default:
gotoxy(16,20);
printf("Sorry, But You Have Entered An Invalid Choice!");
gotoxy(30,21);
printf("Please Try Again...");
getch();
goto exit_menu;
}
}
}
{
gotoxy(16,20);
printf("Sorry, But You Have Entered An Invalid Choice!");
gotoxy(30,21);
printf("Please Try Again...");
getch();
goto exit_menu;
}
}
default:
gotoxy(16,20);
printf("Sorry, But You Have Entered An Invalid Choice!");
gotoxy(30,21);
printf("Please Try Again...");
getch();
goto menu;
}
}

exit:
clrscr();
gotoxy(28,8); printf("Thank You For Banking With Us...");
delay(2000); gotoxy(28,11); printf("Please Don't Forget Your Card...");
delay(2000);gotoxy(28,14); printf("Truly Yours ATM naten");
delay(2000);
getch();
return(0);

}}
 
sir may tanong po ako.. ganito ung situation pinahihingi mo ng number na input ung user kaso hindi number ang na input ng user kundi letters..pano po ba para may lalabas na notification sa user na error ung input nya tapos ipapa input na naman uli ung user..sakin po kasi nag stop lang ung program ko tapos di na pde maka input ung user keilangan mo pa e run uli ung program...

add ka loop sa strart ng program..
 
sir pahelp eto ung sakin

class dov
{

public static void main(String[] args)
{

int k = 1;
int n = 1;
int wantedCount = 5;
int numbersFound = 0;
while ( numbersFound < wantedCount)
{
if (k % n == 0 )
{
System.out.println("Is divisible by" + k++);
numbersFound = numbersFound + 1;

}
k = k ;
}
}
}

ang result nyan ay

1 is divisble by 1
1 is dvsble by 2
1 is divsble by 3
1 is divisble by 4
1 is divisible by 5

paano ko po kaya ako mkkpgcreate na program na ang ilalabas ay ganto:
1 is divisible by 1
2 is divisble by 1, 2
3 is divisible by 1,3
4 is divisible by 1,2,4
5 is divisible by 1,5

paano po kaya ggwn ko code para lumabas ung ganyang resulta?=/ help


JCreator Le po gamit ko basic java app lng sya pahelp po tnx!
 
try this sir. gumagana yan paki edit nlng

#include<stdio.h>
#include<conio.h>
#include<dos.h>


main() /*main program starts here ^_^*/
{
char go,choice1,choice2,exit_choice,deposit,withdraw;
int t=0,amt_deposit,amt_withdraw,x;
float pin,i_pin,balance=100000;


clrscr();
gotoxy(28,8);
printf("-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-");
gotoxy(28,9);
printf("-=ATM namen=-");
gotoxy(28,10);
printf("-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-");
gotoxy(31,12);
printf("Please Insert Your Card...");
gotoxy(7,15);
printf("\t ATM 1f g1: 2010-2011 Finals Project I.T.-TC");
printf("\n\t\t Presented to Ms. jane suarez");
delay(3000);
gotoxy(23,12);
printf("Card Detected. Verifying Your Card. Please Wait...");
delay(3000);


introduction: /*intro*/
clrscr();
gotoxy (28,10); printf("[1] To Enter Pin");
gotoxy (28,12); printf("[2] To Exit.");
gotoxy(26,20);
printf("Please Select An Option.");
go=getche();

switch(go)
{
case'1':
{
clrscr();
gotoxy(35,12);printf("Enter Pin:");
scanf("%f",&i_pin);
goto insert_pin;
}
{
case'2':
{
clrscr();
goto exit;
}
}
default:
gotoxy(16,20);
printf("Sorry, But You Have Entered An Invalid Choice!");
gotoxy(30,21);
printf("Please Try Again...");
getch();
goto introduction;
}


insert_pin: /*pincode*/

pin=72610;

{
if(i_pin==pin)
{
clrscr();
gotoxy(30,12);
printf("PIN accepted...");
delay(2000);
gotoxy(18,14);
printf("Accessing Your Account. Please Wait...");
delay(2000);
goto menu;
}
else
{
t=t+1;
gotoxy(23,12);
printf("Invalid PIN!Please try Again...");
gotoxy(25,14);
printf("Press any key to continue...");
}
if (t<3)
{
getch();
goto introduction;
}
else
{
clrscr();
gotoxy(17,10);
printf("You have reached the maximum of 3 pin attempts.");
printf("\n\n\t\t Your Account has been blocked for safety.");
printf("\n\n\t\t Please contact the ATM technical support team.");
printf("\n\n\t\t Via CP: 09062460929...");
delay(5000);
goto exit;
}

}

menu: /*selecting choices here ^_^*/

{
clrscr();
gotoxy(28,7);
printf("Types Of Transaction Available:");
gotoxy(28,9);
printf("[1]Cash Deposit");
gotoxy(28,11);
printf("[2]Cash Withdraw");
gotoxy(28,13);
printf("[3]Balance Inquiry");
gotoxy(28,15);
printf("[4]Exit");
gotoxy(28,17);
gotoxy(26,20);
printf("Please Select An Option.");
choice1=getche();

switch(choice1)
{
case'1':
{
menu_deposit: /*deposit*/
clrscr();
gotoxy (28,8); printf("[1] To Enter Amount of Deposit.");
gotoxy (28,10); printf("[2] To Cancel.");
gotoxy (28,15); printf("Note: You Can Only Deposit Amount \n\t\t\t\t That Is Divisible by 100.");
gotoxy (28,17); printf("Maximum of P30,000.00 per deposit.");
gotoxy(26,20);
printf("Please Select An Option...");
deposit=getche();

switch (deposit)
{
case '1':
{
clrscr();
gotoxy(34,8);
printf("Transaction: Deposit");
gotoxy(22,10);
printf("How Much Would You Like To Deposit?");
gotoxy(22,11);
printf("Enter Amount: P");
scanf("%d",&amt_deposit);
delay(1000);
gotoxy(22,12);
printf("Cash Deposit Detected. Please Wait...");
delay(1000);
gotoxy(22,13);
printf("Checking Deposit Amount. Please Wait...");
delay(3000);
if (amt_deposit<=30000)
if (amt_deposit%100==0)
{
balance=balance+amt_deposit;
delay(2000);
gotoxy(22,15);
printf("P%d.00 Is Added To Your Account...",amt_deposit);
delay(1000);
gotoxy(22,17);
printf("Press Any Key To Continue...");
getch();
goto menu;
}
if (amt_deposit>30000)
{
clrscr();
gotoxy(18,9);
printf("Please Make Your Sure That Your Deposit \n\t\t\tWas Divisible By 100 ");
printf("\n\t\t And Doesn't Exceed The Maximum Deposit \n\t\t\tThen Try Again");
printf("\n\n\t\t Press Any Key To Return...");
getch();
delay(2000);
goto menu_deposit;
}

else
{
clrscr();
gotoxy(18,9);
printf("Please Make Your Sure That Your Deposit \n\t\t\tWas Divisible By 100 ");
printf("\n\t\t And Doesn't Exceed The Maximum Deposit \n\t\t\tThen Try Again");
printf("\n\n\t\t Press Any Key To Return...");
getch();
delay(2000);
goto menu_deposit;
}
}
case '2':
{
goto menu;
}
default:
gotoxy(16,20);
printf("Sorry, But You Have Entered An Invalid Choice!");
gotoxy(30,21);
printf("Please Try Again...");
getch();
goto menu_deposit;
}}

case'2':
{
menu_withdraw: /*withdraw*/
clrscr();
gotoxy (28,10); printf("[1] To Enter Amount of Withdraw.");
gotoxy (28,11); printf("[2] To Withdraw Fast Cash (P500).");
gotoxy (28,12); printf("[3] To Cancel.");
gotoxy (28,15); printf("Note: You Can Only Withdraw Amount \n\t\t\t\t That Is Divisible by 100 \n");
printf("\t\t\tMaximum of P30,000.00 Per Withdrawal. ");

gotoxy(26,20);
printf("Please Select An Option.");
withdraw=getche();

switch (withdraw)
{
case'1':
{
clrscr();
gotoxy(34,8);
printf("Transaction: Withdraw");
gotoxy(22,11);
printf("How Much Would You Like To Withdraw?");
gotoxy(22,12);
printf("amount:P");
scanf("%d",&amt_withdraw);

if(amt_withdraw>balance)
{
delay(2000);
gotoxy(22,15);
printf("Sorry,You Don't Have Enough Balance In Your Account...");
getch();
goto menu_withdraw;
}
else if(amt_withdraw>30000)
{
delay(2000);
gotoxy(22,15);
printf("Withdrawal Beyond P30000.00 is not allowed.");
getch();
goto menu_withdraw;
}
if (amt_withdraw<100)
{
clrscr();
gotoxy (20,10);
printf("Make Sure That You Withdraw At Minimum of P100.00");
gotoxy (20,12);
printf("Make Sure That You Withdraw At The Maximum of P30000.00");
getch();
goto menu_withdraw;
}
if (amt_withdraw%100!=0)
{
clrscr();
gotoxy (20,10);
printf("Please Make Sure That Your Withdraw\n\t\t\t Amount Is Divisible by 100.");
getch();
goto menu_withdraw;
}
else

balance=balance-amt_withdraw;
gotoxy(22,13);
printf("Transaction in Process, Please Wait...");
delay(3000);
gotoxy(22,15);
printf("Get Your Cash And Transaction Receipt...");
delay(2000);
gotoxy(22,17);
printf("Pess Any Key To Go to Menu...");
getch();
goto menu;
}
case '2':
{
clrscr();
if(balance>500)
{
balance=balance-500;
gotoxy(22,9);
printf("Transaction In Progress...");
delay(1000);
gotoxy(22,11);
printf("Get Your Cash And Transaction Receipt.");
gotoxy(22,15);
printf("Pess Any Key To Go to Menu...");
getch();
goto menu;
}
else
{
delay(1000);
gotoxy(22,12);
printf("Sorry,You Don't Have Enough Balance in Your Account...");
getch();
goto menu_withdraw;
}
}

case '3':
{
goto menu;
}
default:
gotoxy(16,20);
printf("Sorry, But You Have Entered An Invalid Choice!");
gotoxy(30,21);
printf("Please Try Again...");
getch();
goto menu_withdraw;

}
case'3':
{ /*balance check*/
clrscr();
gotoxy(28,8);
printf("Transaction: Balance Inquiry");
gotoxy(22,11);
printf("Transaction in progress...");
delay(1000);
gotoxy(22,13);
printf("Your Account Balance:P%.2f",balance);
gotoxy(22,16);
printf("Press Any Key to Continue...");
getch();
goto menu;
}
case'4': /*extended menu*/
{
exit_menu: /*exit menu*/
clrscr();
gotoxy(28,8);
printf("Want Another Transaction?");
gotoxy(28,11);
printf("[1] Go Back to Menu.");
gotoxy(28,14);
printf("[2] Exit.");
choice2=getch();
switch(choice2)
{
case '1':
{
goto menu;
}
case '2':
{
exit_final:
clrscr();
gotoxy(28,10);
printf("Are You Sure?");
gotoxy(30,11);
printf("[1] Yes.");
gotoxy(30,12);
printf("[2] No. Return to Menu.");
exit_choice=getche();
switch(exit_choice)
{
case'1':
{clrscr();
gotoxy(25,14);
printf("Securing Your Account...");
delay(3000);
goto exit;
}
case'2':
{
goto menu;
}
default:
gotoxy(16,20);
printf("Sorry, But You Have Entered An Invalid Choice!");
gotoxy(30,21);
printf("Please Try Again...");
getch();
goto exit_menu;
}
}
}
{
gotoxy(16,20);
printf("Sorry, But You Have Entered An Invalid Choice!");
gotoxy(30,21);
printf("Please Try Again...");
getch();
goto exit_menu;
}
}
default:
gotoxy(16,20);
printf("Sorry, But You Have Entered An Invalid Choice!");
gotoxy(30,21);
printf("Please Try Again...");
getch();
goto menu;
}
}

exit:
clrscr();
gotoxy(28,8); printf("Thank You For Banking With Us...");
delay(2000); gotoxy(28,11); printf("Please Don't Forget Your Card...");
delay(2000);gotoxy(28,14); printf("Truly Yours ATM naten");
delay(2000);
getch();
return(0);

}}

I have seen code with this structure to solve a different problem in another thread. Unfortunately you are not trying to help, you are propagating bad programming practices. Even if it works, it still deserves a 5.0 (fail).
 
anu patulong po ako..! pwede mo po ba gawan mo ako ng java me application kahit anu pede.. ung di ginagamitan ng wireless toolkit.. wak lng po yung mga games, calendar, calculator, time and date, and converter.! thnx
 
sir pahelp eto ung sakin

class dov
{

public static void main(String[] args)
{

int k = 1;
int n = 1;
int wantedCount = 5;
int numbersFound = 0;
while ( numbersFound < wantedCount)
{
if (k % n == 0 )
{
System.out.println("Is divisible by" + k++);
numbersFound = numbersFound + 1;

}
k = k ;
}
}
}

ang result nyan ay

1 is divisble by 1
1 is dvsble by 2
1 is divsble by 3
1 is divisble by 4
1 is divisible by 5

paano ko po kaya ako mkkpgcreate na program na ang ilalabas ay ganto:
1 is divisible by 1
2 is divisble by 1, 2
3 is divisible by 1,3
4 is divisible by 1,2,4
5 is divisible by 1,5

paano po kaya ggwn ko code para lumabas ung ganyang resulta?=/ help


JCreator Le po gamit ko basic java app lng sya pahelp po tnx!



Code:
import java.io.*;
public class divisible{
	public static void main(String args[])throws IOException{
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		
		System.out.print("Enter a number: ");
		int input = Integer.parseInt(br.readLine());
		
		System.out.println();
		System.out.print(input + " is divisible by, ");
		for(int i = 1; i<=input; i++){
				if((input%i) == 0){
					System.out.print(i + ",");
				}
		}
		
	}
	
}


LOGIC : magloop ka ng size ng ininput mo, example nag input ka ng 5 so mag loop ka ng 5 times,
tapos mag control statement ka sa loob ng loop, a number mod to a number is equals to zero if divisible po sya, :) enjoy

click thanks if my program runs the way what you want ^_^
 
Last edited:
Back
Top Bottom