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!
dre yung sa search po sana??? anung code ba yung>>??
#include <iostream.h>
#include <string>
#include <iomanip>
#include <windows.h>
using namespace std;
char input[256];
void cls(){
system("cls");
}
void intro1 (){
cout<<endl ;
cout<<endl ;
cout<<" ##### ## "<<endl ;
cout<<" ###### /### # "<<endl ;
cout<<" /# / / ### ### # "<<endl ;
cout<<" / / / ### # ## "<<endl ;
cout<<" / / ## ## "<<endl ;
cout<<" ## ## ## ### /### /### ### /## /### ######## "<<endl ;
cout<<" ## ## ## ###/ #### / / ### / ### / ### / ### / ######## "<<endl ;
cout<<" /### ## / ## ###/ / ###/ ## / ### / ###/ ## "<<endl ;
cout<<" / ### ## / ## ## ## / ## ### ## ## "<<endl ;
cout<<" ## ######/ ## ## ## / ######## ## ## "<<endl ;
cout<<" ## ###### ## ## ## ### ####### ## ## "<<endl ;
cout<<" ## ## ## ## ## ### ## ## ## "<<endl ;
cout<<" ## ## ## ## ## ### #### / ### / ## "<<endl ;
cout<<" ## ## ### ###### ### ######/ ######/ ## "<<endl ;
cout<<" ## ## ## ### #### ## ##### ##### ## "<<endl ;
cout<<" ### # / ## "<<endl ;
cout<<" ### / / "<<endl ;
cout<<" #####/ 888 / "<<endl ;
cout<<" ### / "<<endl ;
cout<<"\t\t\t\t 888 F888.888, "<<endl ;
cout<<"\t\t\t\t 888 8888 88"<<endl ;
cout<<"\t\t\t\t 888 888 88 "<<endl ;
cout<<"\t\t\t\t L888b, L888d .88b,"<<endl ;
}
void intro2()
{
cout<<" "<<endl;
cout<<" ***** * **** * ***** ** ***** ** "<<endl;
cout<<" ****** * * ************* ****** **** * ****** **** "<<endl;
cout<<" ** * * * ********* ** * * **** ** * * *** "<<endl;
cout<<" * * * * * * * * * ** * * * *** "<<endl;
cout<<" * * ** * ** * * * * ** "<<endl;
cout<<" ** ** * *** ** ** ** ** ** "<<endl;
cout<<" ** ** ** ** ** ** ** ** ** "<<endl;
cout<<" **** ** ** ** ** ****** **** ** * "<<endl;
cout<<" * *** ** ** ** ** ***** * *** ** * "<<endl;
cout<<" ** ** ** ** ** ** ** ******* "<<endl;
cout<<" ** ** ** ** ** * ** ** ****** "<<endl;
cout<<" *** * * ** * * * ** ** "<<endl;
cout<<" *** * *** * **** * ** ** "<<endl;
cout<<" ****** ******* * *********** ** ** "<<endl;
cout<<" *** *** * ****** ** ** ** "<<endl;
cout<<" * *** * * "<<endl;
cout<<" # ##### ##### ** *** * "<<endl;
cout<<" ## # # # # ****** "<<endl;
cout<<" # # # # *** "<<endl;
cout<<" # ##### ##### "<<endl;
cout<<" # # # "<<endl;
cout<<" # # # # # "<<endl;
cout<<" ##### ##### ##### "<<endl;
}
void closing(){
int i = 3;
while (i > 0)
{
if (i == 1,3)
{
system("color 4F");
intro1();
Sleep(750);
system("cls");
i--;
}
if (i == 2,4)
{
system("color 1F");
intro2();
Sleep(750);
system("cls");
i--;
}
}
}
void menu(int& inp){
string x;
START:
cls();
system("color 03");
cout << "\n\n";
cout << "\t\t\t ____________________________________\t" << endl;
cout << "\t\t\t| CONTROL MENU |\t" << endl;
cout << "\t\t\t|____________________________________|\t" << endl;
cout << "\t\t\t| SUM - Add all the numbers |\t" << endl;
cout << "\t\t\t| AVE - Average all the numbers |\t" << endl;
cout << "\t\t\t| MAX - Get the largest number |\t" << endl;
cout << "\t\t\t| MIN - Get the smallest number |\t" << endl;
cout << "\t\t\t| SORT - Sort the numbers |\t" << endl;
cout << "\t\t\t| SEARCH - Search for a number |\t" << endl;
cout << "\t\t\t| |\t" << endl;
cout << "\t\t\t| CLS - Clear Screen |\t" << endl;
cout << "\t\t\t| QUIT - Quit the program |\t" << endl;
cout << "\t\t\t|____________________________________|\t" << endl;
cout << "\n\n";
REPEAT:
cout << "\t\t\t~>";
cin >>x;
if (x == "SUM")
inp = 1;
else if (x == "AVE")
inp = 2;
else if (x == "MAX")
inp = 3;
else if (x == "MIN")
inp = 4;
else if (x == "SORT")
inp = 5;
else if (x == "SEARCH")
inp = 6;
else if (x == "CLS")
goto START;
else if (x == "QUIT")
inp = -1;
else
goto REPEAT;
}
void mainbody(){
int n,a = 3,i,inp,x = 0,limit,y;
double sum = 0,max = 0,min,search,swapVal;
double ave = 0;
bool found;
double num[n],tempA[n],tempD[n],temp[x];
char Rsearch;
cout<<setprecision(4);
cout.setf(ios::fixed,ios::floatfield);
START:
system("color 37");
cout<<"\n\n\n\n";
cout<<"\t\t _________________.StarT.___________________" <<endl;
cout<<"\t\t~*_| |_*~"<<endl;
cout<<"\t\t~*_| How many numbers do you want to input? |_*~"<<endl;
cout<<"\t\t~*_|___________________________________________|_*~"<<endl;
cout<<"\n\t\t ~>";
cin>>n;
limit = n - 1;
system("color 1F");
cls();
cout<<"_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_"<<endl;
cout<<"_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_\n";
cout<<"_|_|\t\t _|\n";
cout<<"_|_| Inputs Remaining _|\n";
for (i = 0; i < n; i++){
if (i+1 == 1){
cout<<"_|_| "<<n-i<< " inputs _|\t Enter "<<i+1<<"st Number:";}
else if (i+1 == 2){
cout<<"_|_| "<<n-i<< " inputs _|\t Enter "<<i+1<<"nd Number:";}
else if (i+1 == 3){
cout<<"_|_| "<<n-i<< " inputs _|\t Enter "<<i+1<<"rd Number:";}
else{
cout<<"_|_| "<<n-i<< " inputs _|\t Enter "<<i+1<<"th Number:";}
cin>>num;}
min = num[0];
for(i = 0; i < n; i++)
{sum = sum + num;}
ave = sum/n;
for(i = 0; i < n; i++){
if ( max < num)
max = num;}
for(i = 0; i < n; i++){
if ( min > num)
min = num;}
for(i = 0; i < n; i++){
tempA = num;}
for(i = 0; i < n; i++){
tempD = num;}
for (x = 0; x < limit; x++){
for (i = 0; i < limit; i++){
if (tempA > tempA[i+1]){
swapVal = tempA;
tempA = tempA[i+1];
tempA[i+1] = swapVal;
}}}
for (x = 0; x < limit; x++){
for (i = 0; i < limit; i++){
if (tempD < tempD[i+1]){
swapVal = tempD;
tempD = tempD[i+1];
tempD[i+1] = swapVal;
}}}
MENU:
menu(inp);
if (inp == 1){
cls();
system("color 70");
cout<<"\n\n\n\n\n\n\n\n";
cout<<"_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_\n";
cout<<"_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_\n\n";
cout<<"\t\t\t THE SUM OF THE "<<n<<" NUMBERS IS "<<sum<<".\n\n";
cout<<"_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_\n";
cout<<"_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_\n\n";
}
if (inp == 2){
cls();
system("color 34");
cout<<"\n\n\n\n\n\n\n\n";
cout<<"_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_\n";
cout<<"_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_\n\n";
cout<<"\t\t\t THE AVERAGE OF THE "<<n<<" NUMBERS IS "<<ave<<".\n\n";
cout<<"_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_\n";
cout<<"_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_\n\n";
}
if (inp == 3){
cls();
system("color 09");
cout<<"\n\n\n\n\n\n\n\n";
cout<<"_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_\n";
cout<<"_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_\n\n";
cout<<"\t\t\t THE LARGEST OF THE "<<n<<" NUMBERS IS "<<max<<".\n\n";
cout<<"_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_\n";
cout<<"_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_\n\n";
}
if (inp == 4){
cls();
system("color 81");
cout<<"\n\n\n\n\n\n\n\n";
cout<<"_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_\n";
cout<<"_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_\n\n";
cout<<"\t\t\t THE SMALLEST OF THE "<<n<<" NUMBERS IS "<<min<<".\n\n";
cout<<"_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_\n";
cout<<"_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_\n\n";
}
if (inp == 5){
system("color 4E");
cls();
cout<<"_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_"<<endl;
cout<<"_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_\n";
cout<<"_|_|\t\t\t _|_|_|_|_|_|_|_|_|_|\n";
cout<<"_|_|\t ASCENDING ORDER _|_|_|_|_|_|_|_|\t DESCENDING ORDER\n";
for (i = 0; i < n; i++)
cout<<"_|_|\t\t"<<i+1 <<". "<<tempA <<"\t\t\t\t\t\t"<<i+1 <<". "<<tempD <<endl;
}
if (inp == 6){
SEARCH:
cls();
system("color D0");
cout<<"\n\n\n\n";
cout<<"\t\t _________________.Search.__________________" <<endl;
cout<<"\t\t~*_| |_*~"<<endl;
cout<<"\t\t~*_| Input the nunber that you want to find |_*~"<<endl;
cout<<"\t\t~*_|___________________________________________|_*~"<<endl;
cout<<"\n\t\t ~>";
cin>>search;
found = false;
x = 0;
y = 0;
for (i = 0; i < n; i++){
if (search == num){
temp[y] = i;
y++;
x++;
found = true;}}
cout<<"\n\n";
if (found == true){
cout<<"\t\t\t\t\t>ITEM FOUND!<"<<endl;
cout<<"\t\t\t"<<search<<" was found in memory segment(s):"<<endl;
for (i = 0; i < x; i++)
cout<<"\t\t\t\t\tnum["<<temp<<"];"<<endl;}
else
cout<<"\t\t\t ITEM NOT FOUND IN MEMORY!";
cout<<"\t\t\t\t\t\tWould you like to search again? (Y/N):";
RETYPE:
cout<<"\t\t\t\t\t\t ~>";
cin>>Rsearch;
if (Rsearch == 'Y')
goto SEARCH;
else if (Rsearch == 'N')
Sleep(50);
else
goto RETYPE;
}
if (inp == -1)
goto QUIT;
Sleep(1000);
cout<<"\n\t\t ";
system("pause");
goto MENU;
QUIT:
Sleep(50);
}
int main(){
mainbody();
closing();
return 0;
}
ayos na dre salamat sa mga idea ha!!
mas okay siguro kung ilalagay natin Dito yung mga codes natin para hindi pahirapan sa pagscroll at maayos ang thread.. ang haba kasi nung mga codes
suggestion lang naman
#include <iostream.h>
#include <string>
#include <iomanip>
#include <windows.h>
using namespace std;
char input[256];
void cls(){
system("cls");
}
void intro1 (){
cout<<endl ;
cout<<endl ;
cout<<" ##### ## "<<endl ;
cout<<" ###### /### # "<<endl ;
cout<<" /# / / ### ### # "<<endl ;
cout<<" / / / ### # ## "<<endl ;
cout<<" / / ## ## "<<endl ;
cout<<" ## ## ## ### /### /### ### /## /### ######## "<<endl ;
cout<<" ## ## ## ###/ #### / / ### / ### / ### / ### / ######## "<<endl ;
cout<<" /### ## / ## ###/ / ###/ ## / ### / ###/ ## "<<endl ;
cout<<" / ### ## / ## ## ## / ## ### ## ## "<<endl ;
cout<<" ## ######/ ## ## ## / ######## ## ## "<<endl ;
cout<<" ## ###### ## ## ## ### ####### ## ## "<<endl ;
cout<<" ## ## ## ## ## ### ## ## ## "<<endl ;
cout<<" ## ## ## ## ## ### #### / ### / ## "<<endl ;
cout<<" ## ## ### ###### ### ######/ ######/ ## "<<endl ;
cout<<" ## ## ## ### #### ## ##### ##### ## "<<endl ;
cout<<" ### # / ## "<<endl ;
cout<<" ### / / "<<endl ;
cout<<" #####/ 888 / "<<endl ;
cout<<" ### / "<<endl ;
cout<<"\t\t\t\t 888 F888.888, "<<endl ;
cout<<"\t\t\t\t 888 8888 88"<<endl ;
cout<<"\t\t\t\t 888 888 88 "<<endl ;
cout<<"\t\t\t\t L888b, L888d .88b,"<<endl ;
}
void intro2()
{
cout<<" "<<endl;
cout<<" ***** * **** * ***** ** ***** ** "<<endl;
cout<<" ****** * * ************* ****** **** * ****** **** "<<endl;
cout<<" ** * * * ********* ** * * **** ** * * *** "<<endl;
cout<<" * * * * * * * * * ** * * * *** "<<endl;
cout<<" * * ** * ** * * * * ** "<<endl;
cout<<" ** ** * *** ** ** ** ** ** "<<endl;
cout<<" ** ** ** ** ** ** ** ** ** "<<endl;
cout<<" **** ** ** ** ** ****** **** ** * "<<endl;
cout<<" * *** ** ** ** ** ***** * *** ** * "<<endl;
cout<<" ** ** ** ** ** ** ** ******* "<<endl;
cout<<" ** ** ** ** ** * ** ** ****** "<<endl;
cout<<" *** * * ** * * * ** ** "<<endl;
cout<<" *** * *** * **** * ** ** "<<endl;
cout<<" ****** ******* * *********** ** ** "<<endl;
cout<<" *** *** * ****** ** ** ** "<<endl;
cout<<" * *** * * "<<endl;
cout<<" # ##### ##### ** *** * "<<endl;
cout<<" ## # # # # ****** "<<endl;
cout<<" # # # # *** "<<endl;
cout<<" # ##### ##### "<<endl;
cout<<" # # # "<<endl;
cout<<" # # # # # "<<endl;
cout<<" ##### ##### ##### "<<endl;
}
void closing(){
int i = 3;
while (i > 0)
{
if (i == 1,3)
{
system("color 4F");
intro1();
Sleep(750);
system("cls");
i--;
}
if (i == 2,4)
{
system("color 1F");
intro2();
Sleep(750);
system("cls");
i--;
}
}
}
void menu(int& inp){
string x;
START:
cls();
system("color 03");
cout << "\n\n";
cout << "\t\t\t ____________________________________\t" << endl;
cout << "\t\t\t| CONTROL MENU |\t" << endl;
cout << "\t\t\t|____________________________________|\t" << endl;
cout << "\t\t\t| SUM - Add all the numbers |\t" << endl;
cout << "\t\t\t| AVE - Average all the numbers |\t" << endl;
cout << "\t\t\t| MAX - Get the largest number |\t" << endl;
cout << "\t\t\t| MIN - Get the smallest number |\t" << endl;
cout << "\t\t\t| SORT - Sort the numbers |\t" << endl;
cout << "\t\t\t| SEARCH - Search for a number |\t" << endl;
cout << "\t\t\t| |\t" << endl;
cout << "\t\t\t| CLS - Clear Screen |\t" << endl;
cout << "\t\t\t| QUIT - Quit the program |\t" << endl;
cout << "\t\t\t|____________________________________|\t" << endl;
cout << "\n\n";
REPEAT:
cout << "\t\t\t~>";
cin >>x;
if (x == "SUM")
inp = 1;
else if (x == "AVE")
inp = 2;
else if (x == "MAX")
inp = 3;
else if (x == "MIN")
inp = 4;
else if (x == "SORT")
inp = 5;
else if (x == "SEARCH")
inp = 6;
else if (x == "CLS")
goto START;
else if (x == "QUIT")
inp = -1;
else
goto REPEAT;
}
void mainbody(){
int n,a = 3,i,inp,x = 0,limit,y;
double sum = 0,max = 0,min,search,swapVal;
double ave = 0;
bool found;
double num[n],tempA[n],tempD[n],temp[x];
char Rsearch;
cout<<setprecision(4);
cout.setf(ios::fixed,ios::floatfield);
START:
system("color 37");
cout<<"\n\n\n\n";
cout<<"\t\t _________________.StarT.___________________" <<endl;
cout<<"\t\t~*_| |_*~"<<endl;
cout<<"\t\t~*_| How many numbers do you want to input? |_*~"<<endl;
cout<<"\t\t~*_|___________________________________________|_*~"<<endl;
cout<<"\n\t\t ~>";
cin>>n;
limit = n - 1;
system("color 1F");
cls();
cout<<"_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_"<<endl;
cout<<"_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_\n";
cout<<"_|_|\t\t _|\n";
cout<<"_|_| Inputs Remaining _|\n";
for (i = 0; i < n; i++){
if (i+1 == 1){
cout<<"_|_| "<<n-i<< " inputs _|\t Enter "<<i+1<<"st Number:";}
else if (i+1 == 2){
cout<<"_|_| "<<n-i<< " inputs _|\t Enter "<<i+1<<"nd Number:";}
else if (i+1 == 3){
cout<<"_|_| "<<n-i<< " inputs _|\t Enter "<<i+1<<"rd Number:";}
else{
cout<<"_|_| "<<n-i<< " inputs _|\t Enter "<<i+1<<"th Number:";}
cin>>num;}
min = num[0];
for(i = 0; i < n; i++)
{sum = sum + num;}
ave = sum/n;
for(i = 0; i < n; i++){
if ( max < num)
max = num;}
for(i = 0; i < n; i++){
if ( min > num)
min = num;}
for(i = 0; i < n; i++){
tempA = num;}
for(i = 0; i < n; i++){
tempD = num;}
for (x = 0; x < limit; x++){
for (i = 0; i < limit; i++){
if (tempA > tempA[i+1]){
swapVal = tempA;
tempA = tempA[i+1];
tempA[i+1] = swapVal;
}}}
for (x = 0; x < limit; x++){
for (i = 0; i < limit; i++){
if (tempD < tempD[i+1]){
swapVal = tempD;
tempD = tempD[i+1];
tempD[i+1] = swapVal;
}}}
MENU:
menu(inp);
if (inp == 1){
cls();
system("color 70");
cout<<"\n\n\n\n\n\n\n\n";
cout<<"_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_\n";
cout<<"_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_\n\n";
cout<<"\t\t\t THE SUM OF THE "<<n<<" NUMBERS IS "<<sum<<".\n\n";
cout<<"_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_\n";
cout<<"_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_\n\n";
}
if (inp == 2){
cls();
system("color 34");
cout<<"\n\n\n\n\n\n\n\n";
cout<<"_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_\n";
cout<<"_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_\n\n";
cout<<"\t\t\t THE AVERAGE OF THE "<<n<<" NUMBERS IS "<<ave<<".\n\n";
cout<<"_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_\n";
cout<<"_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_\n\n";
}
if (inp == 3){
cls();
system("color 09");
cout<<"\n\n\n\n\n\n\n\n";
cout<<"_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_\n";
cout<<"_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_\n\n";
cout<<"\t\t\t THE LARGEST OF THE "<<n<<" NUMBERS IS "<<max<<".\n\n";
cout<<"_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_\n";
cout<<"_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_\n\n";
}
if (inp == 4){
cls();
system("color 81");
cout<<"\n\n\n\n\n\n\n\n";
cout<<"_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_\n";
cout<<"_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_\n\n";
cout<<"\t\t\t THE SMALLEST OF THE "<<n<<" NUMBERS IS "<<min<<".\n\n";
cout<<"_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_\n";
cout<<"_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_\n\n";
}
if (inp == 5){
system("color 4E");
cls();
cout<<"_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_"<<endl;
cout<<"_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_\n";
cout<<"_|_|\t\t\t _|_|_|_|_|_|_|_|_|_|\n";
cout<<"_|_|\t ASCENDING ORDER _|_|_|_|_|_|_|_|\t DESCENDING ORDER\n";
for (i = 0; i < n; i++)
cout<<"_|_|\t\t"<<i+1 <<". "<<tempA <<"\t\t\t\t\t\t"<<i+1 <<". "<<tempD <<endl;
}
if (inp == 6){
SEARCH:
cls();
system("color D0");
cout<<"\n\n\n\n";
cout<<"\t\t _________________.Search.__________________" <<endl;
cout<<"\t\t~*_| |_*~"<<endl;
cout<<"\t\t~*_| Input the nunber that you want to find |_*~"<<endl;
cout<<"\t\t~*_|___________________________________________|_*~"<<endl;
cout<<"\n\t\t ~>";
cin>>search;
found = false;
x = 0;
y = 0;
for (i = 0; i < n; i++){
if (search == num){
temp[y] = i;
y++;
x++;
found = true;}}
cout<<"\n\n";
if (found == true){
cout<<"\t\t\t\t\t>ITEM FOUND!<"<<endl;
cout<<"\t\t\t"<<search<<" was found in memory segment(s):"<<endl;
for (i = 0; i < x; i++)
cout<<"\t\t\t\t\tnum["<<temp<<"];"<<endl;}
else
cout<<"\t\t\t ITEM NOT FOUND IN MEMORY!";
cout<<"\t\t\t\t\t\tWould you like to search again? (Y/N):";
RETYPE:
cout<<"\t\t\t\t\t\t ~>";
cin>>Rsearch;
if (Rsearch == 'Y')
goto SEARCH;
else if (Rsearch == 'N')
Sleep(50);
else
goto RETYPE;
}
if (inp == -1)
goto QUIT;
Sleep(1000);
cout<<"\n\t\t ";
system("pause");
goto MENU;
QUIT:
Sleep(50);
}
int main(){
mainbody();
closing();
return 0;
}
ayos na dre salamat sa mga idea ha!!
RetZel a;
a.menu();
sir sa suggestion.lagay ko nalang yan sa page 1 kung ipahihintulot mo
meron pala akong CHM file ng book na "C++ : How To Program" by Deitel & Deitel..inform mo nalang ako kung want mo rin
Addison.Wesley.Starting.Out.with.CPP.7th.Edition.Mar.2010
http://wikisend.com/download/496420/Addison.Wesley.Starting.Out.with.CPP.7th.Edition.Mar.2010.rar
anu pinagkaiba ng turbo C sa c ++? saka anu yung C language? dload ko muna yung compiler ng c++ sa 1st page slamat ts raymund![]()
halos pareho lang ang eh kaso mas nadadalian akong magprogram sa c++..
cout at cin sa c++
printf at scanf sa C
compare yung words na gngmit mas maikli yung c++
pwede naman po mag printf at scanf sa c++
kasi nga..ang c++ ay evolution ng c....parang upgrade version lang sya
sabi ng dean namin (Ateneo de Naga University)....para sa kanila daw na old programmer..hehe..mas madali ang printf kasi mas maikli ang code na gagawin compare sa cout....
YES!! ito na un! ito ung hinahanap kong thread! whooo!
Tatambay ako d2 lage bout sa studies ko pra makatulong sa aking pag aaral! xD
Salamat po!![]()
sir pwede po ba makahingi nang code sa c++ about class stack?medyu nahihirapan po kasi ako eh gagawin ko lang sanang reference.thank you in advance.