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!

[ TUTORIAL ] Understanding Basic C++ Programming (For Beginners Guide Only)

is this helpful? then what should you do?

  • yes it is and make this thread sticky.

    Votes: 42 95.5%
  • useless thread. delete it.

    Votes: 2 4.5%

  • Total voters
    44
Re: [ TUTORIAL ] Understanding Basic C++ Programming (For Beginners Guide Only)

sir pahelp nmn po c++ language

ganito po ang program Find the nth Prime numbers:

ex:
User enter 10
then the output should be 29

ex 02;
user enter 5
output is 11

need mo pa ba?
 
Re: [ TUTORIAL ] Understanding Basic C++ Programming (For Beginners Guide Only)

WOW AYOS TO PRE! THANKS :thumbsup:
 
Re: [ TUTORIAL ] Understanding Basic C++ Programming (For Beginners Guide Only)

#include <iostream>
using namespace std;

#pragma region
int main()
{
char answer;

cout << "what is my name? \na. Al lestaire Acasio \nb. Alquitela \nc. almacen.\n";
cin >> answer;
fflush(stdin);
if(answer == 'a' || answer == 'A' )
{
cout << "\nContratulation you know me!\n";
}
else if(answer == 'b' || answer == 'B' )
{
return count;
}
else if(answer == 'c' || answer == 'C' )
{
return count;
}
system("pause");
}
#pragma endregion



Sir pano ko po matatawag ulit yung "cout << "what is my name? \na. Al lestaire Acasio \nb. Alquitela \nc. almacen.\n";";" kung sasagot sila nang mali? anong dapat kong ilagay sa
else if(answer == 'b' || answer == 'B' )
{
return count;
}
else if(answer == 'c' || answer == 'C' )
{
return count;
}:pray:

help po
 
Last edited:
Re: [ TUTORIAL ] Understanding Basic C++ Programming (For Beginners Guide Only)

#include <iostream>
using namespace std;

#pragma region
int main()
{
char answer;

cout << "what is my name? \na. Al lestaire Acasio \nb. Alquitela \nc. almacen.\n";
cin >> answer;
fflush(stdin);
if(answer == 'a' || answer == 'A' )
{
cout << "\nContratulation you know me!\n";
}
else if(answer == 'b' || answer == 'B' )
{
return count;
}
else if(answer == 'c' || answer == 'C' )
{
return count;
}
system("pause");
}
#pragma endregion



Sir pano ko po matatawag ulit yung "cout << "what is my name? \na. Al lestaire Acasio \nb. Alquitela \nc. almacen.\n";";" kung sasagot sila nang mali? anong dapat kong ilagay sa
else if(answer == 'b' || answer == 'B' )
{
return count;
}
else if(answer == 'c' || answer == 'C' )
{
return count;
}:pray:

help po


#include <iostream>
using namespace std;

char question (char a);
char answerA ();
char answerB ();
char answerC ();

int main()
{
char a;
question(a);

system("pause");
return 0;
}


char question (char a)
{
cout << "what is my name? \na. Al lestaire Acasio \nb. Alquitela \nc. almacen.\n\n\n";
cin >> a;
if(a == 'a' || a == 'A' )
{
answerA ();
}

else if (a == 'b' || a == 'B' )
{
answerB ();
}

else if (a == 'c' || a == 'C' )
{
answerC ();
}

else
{
cout << "You entered: " << a << endl;
cout << "Please enter a, b, or c only\n\n\n";
question(a);
}

}


char answerA ()
{
cout << "\nContratulation you know me!\n";
}

char answerB ()
{
char a;
question(a);
}

char answerC ()
{
char a;
question(a);
}

try mo yan, noob lang din ako kaya yan lang, subok lang din :dance::dance::dance:
 
Re: [ TUTORIAL ] Understanding Basic C++ Programming (For Beginners Guide Only)

pa subscribe:thanks:
 
Re: [ TUTORIAL ] Understanding Basic C++ Programming (For Beginners Guide Only)

pa tambay dito... :)
 
Re: [ TUTORIAL ] Understanding Basic C++ Programming (For Beginners Guide Only)

phelp naman sa payroll system ito po yung code

#include <iostream>
#include <fstream>
#include <string>

using namespace std;

void line();
manageEmp();
payslip();

main(){

char choice1;

while(choice1!='C'){
line();
cout<<"PAYROLL SYSTEM"<<endl;
cout<<"[A] MANAGE EMPLOYEE"<<endl;
cout<<" PAYSLIP"<<endl;
cout<<"[C] EXIT"<<endl;
cout<<"SELECT YOUR CHOICE:";
cin>>choice1;
line();

switch(choice1){
case 'a': case 'A':{
manageEmp();
break;
}

case 'b': case 'B':{
payslip();
break;
}

default:{
cout<<"Bye bye!";

}

}
break;
}
return 0;
}

void line(){
cout<<"- - - - - - - - - -"<<endl;
}

manageEmp(){

char choice2;
char EmpNo[10];
char EmpName[50];
char Address[50];
float rph=0.00;

line();
cout<<"PAYROLL SYSTEM - MANAGE EMPLOYEE"<<endl;
cout<<"[D] VIEW ALL"<<endl;
cout<<"[E] SEARCH"<<endl;
cout<<"[F] NEW EMPLOYEE"<<endl;
cout<<"[G] MAIN MENU"<<endl;
cout<<"SELECT YOUR CHOICE:";
cin>>choice2;
line();

switch(choice2){
case 'd': case 'D':{
cout<<"PAYROLL SYSTEM - VIEW ALL"<<endl;
line();

ifstream myfile;
myfile.open("employee.txt");
char emp_id[100];
char emp_name[100];
char address[100];
char find[100];
char choice, choice2, name[100], course[100];

ifstream myReadFile;
myReadFile.open("employee.txt");
char output[100];
if (myReadFile.is_open()) {
while (!myReadFile.eof()) {


myReadFile >> output;
cout<<output;
cout<<endl;


myReadFile.close();
break;
}
return 0;
}

case 'e': case 'E':{
cout<<"PAYROLL SYSTEM - SEARCH"<<endl;
line();

ifstream myfile;
myfile.open("employee.txt");
char emp_id[100];
char emp_name[100];
char address[100];
char find[100];
char choice, choice2, name[100], course[100];
int answer = 0;
while (choice!='C'){

cout<<"Enter Employee No.:";
cin>>emp_id;
while(!myfile.eof()){

myfile.getline(find, 100);
answer=strcmp(emp_id, find);
if (answer==0){
myfile.getline(emp_name, 100);
myfile.getline(address, 100);
cout<<"Employee No.:"<<emp_id<<endl;
cout<<"Name:"<<emp_name<<endl;
cout<<"Address:"<<address<<endl;

}
}
}
break;
}
return 0;
}
case 'f': case 'F':{

cout<<"PAYROLL SYSTEM - ADD EMPLOYEE"<<endl;
line();

cout<<"Enter Employee Number:"<<endl;
cin>>EmpNo;
cout<<"Enter Name:"<<endl;
cin>>EmpName;
cout<<"Enter Address:"<<endl;
cin>>Address;
cout<<"Enter Rate Per Hour:"<<endl;
cin>>rph;

ofstream addEmployee;
addEmployee.open("employee.txt", ios::app);
if(addEmployee.is_open()){

addEmployee<<EmpNo<<endl;
addEmployee<<EmpName<<endl;
addEmployee<<Address<<endl;
addEmployee<<rph<<endl;
addEmployee<<endl;

}
else{
cout<<"unable to open!";
}
addEmployee.close();
break;
}
case 'g': case 'G':{
main();
break;
}
}
return 0;
}

payslip(){
char choice3;

line();
cout<<"PAYROLL SYSTEM - PAYSLIP"<<endl;
cout<<"[H] VIEW PAYSLIP"<<endl;
cout<<" CREATE PAYSLIP"<<endl;
cout<<"[J] MAIN MENU"<<endl;
cout<<"SELECT YOUR CHOICE:";
cin>>choice3;
line();

switch(choice3){
case 'h': case 'H':{
break;
}
case 'i': case 'I':{
break;
}
case 'j': case 'J':{
main();
break;
}
}
return 0;
}



tpos ito po yung error msg


H:\payroll system\payroll.cpp(100) : error C2360: initialization of 'myReadFile' is skipped by 'case' label
H:\payroll system\payroll.cpp(82) : see declaration of 'myReadFile'
H:\payroll system\payroll.cpp(100) : error C2360: initialization of 'myfile' is skipped by 'case' label
H:\payroll system\payroll.cpp(74) : see declaration of 'myfile'
H:\payroll system\payroll.cpp(100) : error C2360: initialization of 'myReadFile' is skipped by 'case' label
H:\payroll system\payroll.cpp(82) : see declaration of 'myReadFile'
H:\payroll system\payroll.cpp(100) : error C2360: initialization of 'myfile' is skipped by 'case' label
H:\payroll system\payroll.cpp(74) : see declaration of 'myfile'
Error executing cl.exe.


salamat sa tutulong
 
Re: [ TUTORIAL ] Understanding Basic C++ Programming (For Beginners Guide Only)

:thanks: pa TAMBAY dito :clap:
 
Re: [ TUTORIAL ] Understanding Basic C++ Programming (For Beginners Guide Only)

kakalito ang ginagawa ko..wahaha...
 
Re: [ TUTORIAL ] Understanding Basic C++ Programming (For Beginners Guide Only)

pwede ba C language problem dito?
 
Re: [ TUTORIAL ] Understanding Basic C++ Programming (For Beginners Guide Only)

salamat ts
 
Re: [ TUTORIAL ] Understanding Basic C++ Programming (For Beginners Guide Only)

nice one sir...
 
Re: [ TUTORIAL ] Understanding Basic C++ Programming (For Be

Sir pa help po sa C++
how to run batch file with different selection

example

Select Model
=========
1. Panasonic
2. Sony
3. Samsung

then after nila makapili ng model magrurun ung sinilect nila bawat isa po jan ay may batch file nahirapan po kasi ako newbie lang po
 
Re: [ TUTORIAL ] Understanding Basic C++ Programming (For Be

sir gawa ka pdf ni2 para mabasa ko nang paulit ulit sa android
 
ganda nito,ayos ang tutorial.:thanks:.po sa pag share.
 
Back
Top Bottom