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!

-= Having Difficulties in C++ and Java? Be a Part of This Thread =-

Re: -= Having Difficulty in C++? Be a Part of This Thread =-

Yun daw kse gagmitin namin tol eh isa lang daw..siege pg aralan ko parehas thanks

ok..hehe..

hanap ka po sa youtube..marami nyan :)
 
Re: -= Having Difficulty in C++? Be a Part of This Thread =-

ok bro thanks hehe sbi ng prof ko pde dw khit anu gmitin kaya yun nalang nandito ggmitin ko same lng nmn dw ng output..mgnda pla pg aralan c++ nsa hello world plang kmi pro enjoy mg advance :)
 
Re: -= Having Difficulty in C++? Be a Part of This Thread =-

mas magandang pag-aralan yang dalawa..parehas naman yan tinatanggap sa c++..katulad na lamang neto..combination!
pano gamit nung void? GDC?
:help:
 
Re: -= Having Difficulty in C++? Be a Part of This Thread =-

dev c++ pala gamit dito :)
di ko pa nagagamit yan.. turbo C++ ide ginamit ko..
btw..pasensya mga bro. di ako masyado acytive sa thread..busy kasi sa school..
pero bibisita pa din ako dito..
more powers to c++ teAm :)
 
Last edited:
Re: -= Having Difficulty in C++? Be a Part of This Thread =-

baka my site or pdf kayo dyan ng c++ by microsoft?yun kse gmit namin eh thanks

eto bro..sa attachment. goodluck po ^^
sa tanong ,post ka lang ulit dito tulungan ka namin :)
 

Attachments

  • c++Tutorial.pdf
    1.2 MB · Views: 24
Re: -= Having Difficulty in C++? Be a Part of This Thread =-

pano gamit nung void? GDC?
:help:

ung void po ginagamit kapag hindi mo kelangan magreturn sa function...

tapos ung gdc..hehe..di ko alam yan.. hehe
 
Re: -= Having Difficulty in C++? Be a Part of This Thread =-

@jkevin tol pa dl ako thanks baka ayun yung hanap ko....tol yung void ayan yung gmit nmin hehe
 
Last edited:
Re: -= Having Difficulty in C++? Be a Part of This Thread =-

pano gamit nung void? GDC?
:help:

bale yung code na pinost ko...para yung sa paghahanap ng GCD (Greatest Common Divisor or Greatest Common Factor )

bale sample ko lang yun..combination ng void at int main :P
 
Re: -= Having Difficulty in C++? Be a Part of This Thread =-

patulong po sa project ko..

Convert an integer to string using the following code:
int number = 5; //any integer for example: 5
char s[100]; //an empty array of characters
itoa(number, s, 10); //conversion function. converting number to string s as a decimal (base 10).
string str += string(s); //You can concatenate your converted integer to another string or do whatever you want.

Thank you po.
 
Re: -= Having Difficulty in C++? Be a Part of This Thread =-

@jkevin tol pa dl ako thanks baka ayun yung hanap ko....tol yung void ayan yung gmit nmin hehe

sige lang po...
 
Re: -= Having Difficulty in C++? Be a Part of This Thread =-

On working!.. Project namin sa Programming!.. Haha. too basic palang :yipee:

#include <iostream>
#include <conio.h>
using namespace std;
int main()
{
system ("COLOR 5E");
system ("TITLE CONVERTER-by-rudy17");
int choiceA, length, weight, force, velocity, area, volume, capacity, num1;
int pressure, torque, american;
char yes;


TOP: //use goto to jump here
system ("CLS");
//Welcome And Number Field
cout<<"\n\n"<<"Enter The Number To Convert: \n";
cin>>num1;

system ("CLS");

//This is the First Step
cout<<"\n\n\t\t\t =============================\n";
cout<<"\t\t\t |What Conversion do you Prefer? |\n";
cout<<"\t\t\t |1. Length |\n";
cout<<"\t\t\t |2. Weight |\n";
cout<<"\t\t\t |3. FORCE |\n";
cout<<"\t\t\t |4. Velocity |\n";
cout<<"\t\t\t |5. AREA |\n";
cout<<"\t\t\t |6. VOLUME |\n";
cout<<"\t\t\t |7. CAPACITY |\n";
cout<<"\t\t\t |8. PRESSURE |\n";
cout<<"\t\t\t |9. TORQUE |\n";
cout<<"\t\t\t |10. American Dry Measurements |\n";
cout<<"\t\t\t |11. EXIT"<<"\n\n";

cin>>choiceA;
switch (choiceA)
{
case 1:
goto LENGTH;
case 2:
goto WEIGHT;
case 3:
goto FORCE;
case 4:
goto VELOCITY;
case 5:
goto AREA;
case 6:
goto VOLUME;
case 7:
goto CAPACITY;
case 8:
goto PRESSURE;
case 9:
goto TORQUE;
case 10:
goto AMERICAN;
case 11:
goto EXIT;


}

//LENGTH
LENGTH:
system ("CLS");
cout<<"Choose Your Conversion"<<"\n\n";
cout<<"1. Inches to Millimeter\n";
cout<<"2. Millimeter to Inches\n";
cout<<"3. Inches to Centimeter\n";
cout<<"4. Centimeter to Inches\n";
cout<<"5. EXIT"<<"\n\n";
cin>>length;
switch (length)
{
case 1:
cout<<"The answer is: "
<<num1 * 25.4; break;
case 2:
cout<<"The answer is: "
<<num1 * 0.0394; break;
case 3:
cout<<"The answer is: "
<<num1 * 2.54; break;
case 4:
cout<<"The answer is: "
<<num1 * 0.3937; break;
default:
goto LENGTH;
}

cout<<"\n\n Do you want to Convert another?[Y/N]";
cin>>yes;
if (yes=='Y'||'y')
goto TOP;
else

getch ();
return 0;





//WEIGHT
WEIGHT:
system ("CLS");
cout<<"Choose Your Conversion"<<"\n\n";
cout<<"1. Ounces to Grams\n";
cout<<"2. Grams to Ounces\n";
cout<<"3. Pounds to Grams\n";
cout<<"4. Grams to Pound\n";
cout<<"5. EXIT"<<"\n\n";
cin>>weight;
switch (weight)
{
case 1:
cout<<"The answer is: "
<<num1 *28.349; break;
cin.get();
case 2:
cout<<"The answer is: "
<<num1 *0.03527; break;
case 3:
cout<<"The answer is: "
<<num1 *453.59; break;
case 4:
cout<<"The answer is: "
<<num1 *0.002205; break;
case 5:
goto EXIT;

}
cout<<"\n\n Do you want to Convert another?[Y/N]";
cin>>yes;
if (yes=='Y'||'y')
goto TOP;
else

getch ();
return 0;


//Force
FORCE:
system ("CLS");
cout<<"Choose Your Conversion"<<"\n\n";
cout<<"1. kilonewtons to pounds\n";
cout<<"2. pounds to kilonewtons\n";
cout<<"3. kilonewtons to tons\n";
cout<<"4. tons to kilonewtons\n";
cout<<"5. EXIT"<<"\n\n";
cin>>force;
switch (force)
{
case 1:
cout<<"The answer is: "
<<num1 *224.8 ; break;
case 2:
cout<<"The answer is: "
<<num1 *0.004448 ; break;
case 3:
cout<<"The answer is: "
<<num1 *0.10036 ; break;
case 4:
cout<<"The answer is: "
<<num1 *9.96401 ; break;
case 5:
goto EXIT;
}


cout<<"\n\n Do you want to Convert another?[Y/N]";
cin>>yes;
if (yes=='Y'||'y')
goto TOP;
else

getch ();
return 0;


//VELOCITY
VELOCITY:
system ("CLS");
cout<<"Choose Your Conversion"<<"\n\n";
cout<<"1.miles/hour to kilometres/hour\n";
cout<<"2.kilometres/ hour to miles/hour\n";
cout<<"3.feet/second to metres/second\n";
cout<<"4.metres/second to feet/second\n";
cout<<"5. EXIT"<<"\n\n";
cin>>velocity;
switch (velocity)
{
case 1:
cout<<"The answer is: "
<<num1 *1.609 ; break;
case 2:
cout<<"The answer is: "
<<num1 *0.6117 ; break;
case 3:
cout<<"The answer is: "
<<num1 *0.305 ; break;
case 4:
cout<<"The answer is: "
<<num1 *3.279 ; break;
case 5:
goto EXIT;
}


cout<<"\n\n Do you want to Convert another?[Y/N]";
cin>>yes;
if (yes=='Y'||'y')
goto TOP;
else

getch ();
return 0;

//AREA
AREA:
system ("CLS");
cout<<"Choose Your Conversion"<<"\n\n";
cout<<"1.sq-inches to sq-millimetres\n";
cout<<"2.sq-millimetres to sq-inches\n";
cout<<"3.sq-inches to sq-centimetres\n";
cout<<"4.sq-centimetres to-sq inches\n";
cout<<"5. EXIT"<<"\n\n";
cin>>area;
switch (area)
{
case 1:
cout<<"The answer is: "
<<num1 *645.16; break;
case 2:
cout<<"The answer is: "
<<num1 *0.001550; break;
case 3:
cout<<"The answer is: "
<<num1 *6.452; break;
case 4:
cout<<"The answer is: "
<<num1 *0.155; break;
case 5:
goto EXIT;
}

cout<<"\n\n Do you want to Convert another?[Y/N]";
cin>>yes;
if (yes=='Y'||'y')
goto TOP;
else

getch ();
return 0;


//VOLUME
VOLUME:
system ("cls");
cout<<"Choose Your Conversion"<<"\n\n";
cout<<"1.cu inches to cu centimetres\n";
cout<<"2.cu centimetres to cu inches\n";
cout<<"3.cu inches to cu decimetres\n";
cout<<"4.cu feet to cu metres\n";
cout<<"5. EXIT"<<"\n\n";
cin>>volume;
switch (volume)
{
case 1:
cout<<"The answer is: "
<<num1 *16.39; break;
case 2:
cout<<"The answer is: "
<<num1 *0.06102; break;
case 3:
cout<<"The answer is: "
<<num1 *16.387; break;
case 4:
cout<<"The answer is: "
<<num1 *0.02832; break;
case 5:
goto EXIT;
}
cout<<"\n\n Do you want to Convert another?[Y/N]";
cin>>yes;
if (yes=='Y'||'y')
goto TOP;
else

getch ();
return 0;

//CAPACITY
CAPACITY:
system ("CLS");

cout<<"Choose Your Conversion"<<"\n\n";
cout<<"1.fluid ounce to litres\n";
cout<<"2.fluid ounce to cu inches\n";
cout<<"3.US fluid ounce to litres\n";
cout<<"4.US fluid ounce to cu inches\n";
cout<<"5. EXIT"<<"\n\n";
cin>>pressure;
switch (pressure)
{
case 1:
cout<<"The answer is: "
<<num1 *0.0284; break;
case 2:
cout<<"The answer is: "
<<num1 *1.8047; break;
case 3:
cout<<"The answer is: "
<<num1 *0.0296; break;
case 4:
cout<<"The answer is: "
<<num1 *1.878; break;
case 5:
goto EXIT;
}
cout<<"\n\n Do you want to Convert another?[Y/N]";
cin>>yes;
if (yes=='Y'||'y')
goto TOP;
else

getch ();
return 0;

//PRESSURE
PRESSURE:
system ("cls");
cout<<"Choose Your Conversion"<<"\n\n";
cout<<"1.pounds/in^2 to kilonewtons/m^2\n";
cout<<"2.pounds/in^2 to Atmosphere\n";
cout<<"3.pounds/in^2 to Kilograms/m^2\n";
cout<<"4.Pascal to pounds/in^2\n";
cout<<"5. EXIT"<<"\n\n";
cin>>length;
switch (length)
{
case 1:
cout<<"The answer is: "
<<num1 *6.895; break;
case 2:
cout<<"The answer is: "
<<num1 *0.0680 ; break;
case 3:
cout<<"The answer is: "
<<num1 *9.80665 ; break;
case 4:
cout<<"The answer is: "
<<num1 * 14.696; break;
case 5:
goto EXIT;
}

cout<<"\n\n Do you want to Convert another?[Y/N]";
cin>>yes;
if (yes=='Y'||'y')
goto TOP;
else

getch ();
return 0;

//TORQUE
TORQUE:
system ("cls");
cout<<"Choose Your Conversion"<<"\n\n";
cout<<"1.Newton Metres to Foot Pound.\n";
cout<<"2.Newton Metres to Kilogram Force Metres\n";
cout<<"3.Foot Pounds to Newton Metres \n";
cout<<"4.Foot Pounds to Kilogram Force Metres\n";
cout<<"5. EXIT"<<"\n\n";
cin>>torque;
switch (torque)
{
case 1:
cout<<"The answer is: "
<<num1 * 0.7376; break;
case 2:
cout<<"The answer is: "
<<num1 * 0.1020; break;
case 3:
cout<<"The answer is: "
<<num1 * 1.356; break;
case 4:
cout<<"The answer is: "
<<num1 * 0.1383; break;
case 5:
goto EXIT;
}
cout<<"\n\n Do you want to Convert another?[Y/N]";
cin>>yes;
if (yes=='Y'||'y')
goto TOP;
else

getch ();
return 0;

//American Dry Measurements
AMERICAN:
system ("cls");
cout<<"Choose Your Conversion"<<"\n\n";
cout<<"1.pint to liter\n";
cout<<"2.quart to liters\n";
cout<<"3.peck (8 quarts) to liters\n";
cout<<"4.bushel (4 pecks) to iters\n";
cout<<"5. EXIT"<<"\n\n";
cin>>length;
switch (length)
{
case 1:
cout<<"The answer is: "
<<num1 * 0.550; break;
case 2:
cout<<"The answer is: "
<<num1 * 1.101; break;
case 3:
cout<<"The answer is: "
<<num1 * 8.81; break;
case 4:
cout<<"The answer is: "
<<num1 * 35.3; break;
case 5:
goto EXIT;
}

cout<<"\n\n Do you want to Convert another?[Y/N]";
cin>>yes;
if (yes=='Y'||'y')
goto TOP;
else

getch ();
EXIT:

return 0;
}
 
Re: -= Having Difficulty in C++? Be a Part of This Thread =-

On working!.. Project namin sa Programming!.. Haha. too basic palang :yipee:

group project ba yan tol?haba ah hehe kmi bgo plng mg start c++
 
Re: -= Having Difficulty in C++? Be a Part of This Thread =-

On working!.. Project namin sa Programming!.. Haha. too basic palang :yipee:

Mention ko lang, mali po ang code na ito
Code:
if (yes=='Y'||'y')

dapat

Code:
if (yes=='Y' || yes==''y')

kasi young former ay always true ang evaluation therefore hindi talaga mag'eexit ang program mo. Try mo mg'answer ng n or N, cocontinue pa rin sya sa pag'convert
 
Re: -= Having Difficulty in C++? Be a Part of This Thread =-

group project ba yan tol?haba ah hehe kmi bgo plng mg start c++


Oo tol, kaso ako palang marunong at ako lang den nagawa. ^_^
Mention ko lang, mali po ang code na ito
Code:
if (yes=='Y'||'y')

dapat

Code:
if (yes=='Y' || yes==''y')

kasi young former ay always true ang evaluation therefore hindi talaga mag'eexit ang program mo. Try mo mg'answer ng n or N, cocontinue pa rin sya sa pag'convert
Haha.. thanks tol yun problema ko eh,. by the way eto yung finish project ko, view nyo nalang
http://www.mediafire.com/?5b7c5ls9z9n0xn3
 
Re: -= Having Difficulty in C++? Be a Part of This Thread =-

Mention ko lang, mali po ang code na ito
Code:
if (yes=='Y'||'y')

dapat

Code:
if (yes=='Y' || yes==''y')

kasi young former ay always true ang evaluation therefore hindi talaga mag'eexit ang program mo. Try mo mg'answer ng n or N, cocontinue pa rin sya sa pag'convert

tol dba error yan
if (yes=='Y' || yes==''y')
double yung quote mo ^_^.. thanks at natapos ko yung aken dahil sayo ! :dance:
 
Re: -= Having Difficulty in C++? Be a Part of This Thread =-

bale yung code na pinost ko...para yung sa paghahanap ng GCD (Greatest Common Divisor or Greatest Common Factor )

bale sample ko lang yun..combination ng void at int main :P


salamat bro ... heheh wala pa kami sa ganyang codes heheh:thumbsup:
 
Re: -= Having Difficulty in C++? Be a Part of This Thread =-

Mga kuya at ate pa help naman po nito. di ko na alam ang gagawin ko sa turbo c++ , pagawa naman po ng sourcecode nito sa c++ :pray::pray::pray: , project po namin yan please help para po pumasa :pray::pray::pray:



Assume a range of integer valves starting from N1 and N2. Assume also an integer say M. Write a program that will print and display all the numbers from N1 to n2 w/c are divisible by M. You are also required to display the count of each number. For example, if N1=4, N2=12 and M=4, the output will be: 4,8,12. The valve 3 will also be displayed indicating that there are 3 numbers which are divisible by 4.





pa help naman po please :pray::pray::pray: . tnx po sa tutulong sa akin. :pray::pray::pray:
 
Re: -= Having Difficulty in C++? Be a Part of This Thread =-

may syntax paba na alternate dito yung mejo mas simple pa

#include <iostream>
#include <string>

using namespace std;

int main()

{
char string[256];

cout << "Jose Rizal Universtity" <<endl;
cout << endl;
cout << "Name: ";
cin.getline ( string, 256, '\n'); //pano ko nga pala iexplain pah '\n' ang ginamit ko instead of "\n" na search ko lang kasi yan eh pede ko pa ba padaliin salamat
cin.get();


cout << "Course: "<<endl;
cin.getline ( string, 256, '\n');
cin.get();


cout << "Subject: "<<endl;
cin.getline ( string, 256, '\n' );
cin.get();

cout << "This is my first program using the standard insertion stream operator \n";
cin.getline ( string, 256, '\n' );
cin.get();
return 0;
}
 
Back
Top Bottom