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!

[GTCD] c++ PROBLEMS ONLY ft. [BISDAK]

help po di ako makapagsave di ko alam gagawin ko dito :noidea:


#include<iostream.h>
#include<conio.h>
#include<stdlib.h>
#include<dos.h>
#include<ctype.h>
#include<string.h>

char haha='Z', cans;
int box(int c1, int c2, int r1, int r2);
char displayscreen(char title);
void displayinfo();
void mainscreen();
void add();
void edit();
void del();

char name[10];
int id[10];
int rph[10];
int nhw[10];
int net[10];
int o;


int main()
{
mainscreen();
haha='Z';
while(haha!='A'&&haha!='a'&&haha!='E'&&haha!='e'&&haha!='D'&&haha!='d'&&haha!='X'&&haha!='x')
{
gotoxy(32,17); cin>>haha;
mainscreen();
if (toupper (haha)=='A')
{
displayscreen('A');
add();
haha='Z';
mainscreen();
}
else if (toupper (haha)=='E')
{
displayscreen('E');
edit();
haha='Z';
}
else if (toupper (haha)=='D')
{
displayscreen('D');
del();
haha='Z';
}
else if (toupper (haha)=='X')
{
//cout<<"exit";
exit;
}
}
return 0;
}
int box(int c1, int c2, int r1, int r2)
{
int x,y;
for(x=c1;x<=c2;x++)
{
gotoxy(x,r1);cout<<"*";
gotoxy(x,r2);cout<<"*";
}
for(y=r1;y<=r2;y++)
{
gotoxy(c1,y);cout<<"*";
gotoxy(c2,y);cout<<"*";
}
return 0;
}
char displayscreen( char title)
{
if (title =='A')
cout<<" ";
else if (title =='E')
cout<<" ";
else if (title =='D')
cout<<" ";
return title;
}

void mainscreen()
{
box(2,78,2,6);
box(2,37,7,18);
box(39,78,7,18);
box(2,78,19,24);
gotoxy (15,3);cout<<"Nueva Ecija University of Science and Technology";
gotoxy (30,4); cout<<"Cabanatuan City";
gotoxy (30,5); cout<<"Payroll Program";
gotoxy (4,8); cout<<"[A] = Add Data";
gotoxy (4,10); cout<<"[V] = View Data";
gotoxy (4,12); cout<<"[E] = Edit Data";
gotoxy (4,14);cout<<"[D] = Delete Data";
gotoxy (4,16); cout<<"[X] Exit";
gotoxy(24,17);
gotoxy (4,17); cout<<"Select your choice [ ]";
gotoxy (48,9); cout<<"kezuke san";
gotoxy (53,12); cout<<" V 1.0";
gotoxy (50,14); cout<<"Dec. 12, 2010";
getch();
}

void add()
{ char cans;
int ded;
ded=120;
gotoxy(48,9);cout<<"enter stud id ";cin>>name[o];
gotoxy(48,10);cout<<"enter name ";cin>>id[o];
gotoxy(48,11);cout<<"NHW ";cin>>nhw[o];
gotoxy(48,12);cout<<"RPH ";cin>>rph[o];
net[o] = nhw[o] * rph[o] - ded;
cans ='x';
while(cans!='y'&&cans!='n')
{
gotoxy(48,18);cout<<"do you want to save this [y/n]";
gotoxy(74,17);cin>>cans;
if (cans=='y')
{
gotoxy(74,17);cout<<"save";
}
else if(cans=='n')
{
name[o]=' ';
id[o]=' ';
rph[o]=' ';
nhw[o]=' ';
gotoxy(48,18);cout<<"canceled";
}
}
getch();
}
void edit()
{ int a;
clrscr();
gotoxy(48,9);cout<<"enter stud id ";cin>>a;
gotoxy(48,10);cout<<"enter name ";cin>>a;
gotoxy(48,11);cout<<"NHW ";cin>>a;
gotoxy(48,12);cout<<"RPH ";cin>>a;
getch();
}
void del()
{
gotoxy(48,9);cout<<"haha";
getch();
}


sana po may tunulong :help:
 
ok lang poh ba na e re.structure ko yung codes mo kuya?
 
ate natad123 need your help po...ive sent you a PM..

-THANKS
 
sige po master natad ^^, salamat po sa pag pansin...nga po pala turbo c lang po yan...
 
Last edited:
ate natad. meron ka po bang mairerecommend na tutorial website about sa file handling?. finals na po kc nmen ngayong monday.

:praise:
 
@kezuke

haba ng code ,gumawa din kami nyan hehehe,info system using c++ ang compiler is turbo c++
nag store ba sya notepad?
 
Last edited:
update! :salute: para sa di pa nakakakita nito..
 
up up up para sa mga naghahanap nito....
 
naghihintay pa rin poh :pacute:
 
help naman po.. source code po to convert decimal to octal using function po. :pray: :praise:
 
patulong naman dito sa experiment na to. hirap ksi intindihan c++ program din.

eto ung prob.

Develop a c++ program that will determine the gross pay for each of the employees. the

company pays "straight-time" for the first 40hrs worked by each employee and pays a "time-

and-a-half" for all worked in excess of 40hours. you are given a list of employee last week

and the hourly rate of each employee. Your program should input this information for each

employee, and should determine and display the employee's gross pay. your program will

end if a negative value was entered.

salamat sa makakatulong. o kahit idea lng kung pano simulan. :salute:
 
per day nag titimes 2 ung amount . mag uumpisa sa 0.01. haanggang 64 day
day amount
1 0.01
2 0.02
3 0.04
4 0.08
 
Pahelp naman po sa assignment ko sa turbo c! Di ko po kasi mainitindihan kung panu gagawin yung program na iterative statements(for,while,do-while). Plis?

1. Write a program which produces the given sequence numbers using the three looping statements:
5 1 4 2 3 3 2 4 1 5
 
Good morning mga ka symbian :D weeh.. patulong naman po sa C++ ko.. XD wala pa kasi ako masyadong alam sa paggamit ng array.. yung sa union,intersection and difference ng sets(array ang ginamit ko), papano po kaya un? :D
ito pa po di ko magets ang ibig nyang sabihin "program that asks the user to type 10 integers of an array and an integer value V. the program must search if the value V exists in the array and must remove the first occurrence of V, shifting each following element to the left and adding zero at the end of the array. the program must then write the final array. :help::noidea::pray::noidea::help:



:praise::upset::upset::upset::praise:

:salute:
 
Good morning mga ka symbian :D weeh.. patulong naman po sa C++ ko.. XD wala pa kasi ako masyadong alam sa paggamit ng array.. yung sa union,intersection and difference ng sets(array ang ginamit ko), papano po kaya un? :D
ito pa po di ko magets ang ibig nyang sabihin "program that asks the user to type 10 integers of an array and an integer value V. the program must search if the value V exists in the array and must remove the first occurrence of V, shifting each following element to the left and adding zero at the end of the array. the program must then write the final array. :help::noidea::pray::noidea::help:



:praise::upset::upset::upset::praise:

:salute:


Code:
        for(int i=0; i<MAX; i++)  // MAX = 10
        {
                if(myInt == array[i])
                {
                        for(int j=i; j<MAX; j++)
                                array[j] = array[j+1];

                        array[MAX-1] = 0;
                        break;
                }
        }
 
Back
Top Bottom