zandiago 115 Nearly a Posting Maven Featured Poster

A few things. A decent start, but remember to include the header <cmath>. Another thing, are you wanting to determine the lenght of the number that the user inputs?

zandiago 115 Nearly a Posting Maven Featured Poster

For those who loves games: (beginners)
1. Tic Tac Toe program.
2. how about writing a c++ game that asks the user to guess a number between 1 and a 100. If you guessed correctly, it will say you win. If your too high or too low it will also let you know. i've done this program before, so i can help you with it. If you try your best, we'll help you along.

zandiago 115 Nearly a Posting Maven Featured Poster

A few things: We only provide help, we don't give away codes. You must also try to think about it on your own.
Minimum value for a variable of type short. –32768.
Maximum value for a variable of type short. 32767.
Visit here for some other relavnt information:http://msdn2.microsoft.com/en-us/library/ms860861.aspx I have the entire program (i had to do it a while back for a project), so i'll help you along but give it a shot. See what you come up with and post it here. See you around.

zandiago 115 Nearly a Posting Maven Featured Poster

Your welcome. Sorry i couldn't help any further, Another cool game is deal or no deal, you could try that or tic tac toe. Also visit: http://www.cplusplus.com/articles/Sacha1.html

zandiago 115 Nearly a Posting Maven Featured Poster
#include <iomanip>
#include <cmath>
#include <fstream>
#include <string>
#include<string>
#include<iostream>
#include<iomanip>

using namespace std;

int readInfo(); 

int main()
{
  int returnVal;
  returnVal = readInfo();
  return returnVal;
}

int readInfo()
{
    ifstream infile;
    ofstream outfile;

    int num = 0;//number of grades
    int Hi = 0;//highest test grade
    int Low = 0;//lowest test grade
    string stat;//status of grade, whether higher or lower than average

    infile.open ("grades.txt");
    outfile.open ("gradeOutput");

    double number;//the grades as in the infile

	int i = 0;
	int storedGrades[60];
    while (infile>>number)
    {    
		storedGrades[i] = number;
        cout<<"The number of test scores : "<<num<<endl;
        double average = (number/num);//average of all the grades
        cout<<"The average of the test scores : "<<average<<endl;
        cout<<"The highest test score was "<<Hi<<" and the lowest test grade was "<<Low<<endl;
        cout<<"Grade "<<setw(5)<<"Status"<<endl;

        if (number<average)
        {
        cout<<number<<setw(5)<<" Below"<<endl;
        }
        else if (number>average)
        {
        cout<<number<<setw(5)<<" Above"<<endl;
    }
	}
    
    return 0;
}

My infile:

48
69
38
79
92

My output:

The number of test scores : 0
The average of the test scores : 1.#INF
The highest test score was 0 and the lowest test grade was 0
Grade Status
48 Below
The number of test scores : 0
The average of the test scores : 1.#INF
The highest test score was 0 and the lowest test grade was 0
Grade Status
69 Below
The number of test scores : 0
The average of the test scores : 1.#INF
The highest test score was 0 and the lowest test grade was 0
Grade Status
38 Below
The number …
zandiago 115 Nearly a Posting Maven Featured Poster

oookk then....what a long code....i won't even bother to compile the program...whats this game suppose to be? sneha_venky...try somrthing simple to start out with...how about writing a c++ game that asks the user to guess a number between 1 and a 100. If you guessed correctly, it will say you win. If your too high or too low it will also let you know. i've done this program before, so i can help you with it. If you try your best, we'll help you along. Additionally, the code above has several syntax errors. Have a good day.

zandiago 115 Nearly a Posting Maven Featured Poster

Ok thanks much again guys. Problem solved, i made a bit of modifications and i encountered a few syntax errors, but were taken care of. The program works like a charm. see you guys again soon, time to move on to my new thread.

zandiago 115 Nearly a Posting Maven Featured Poster

hopalongcassidy.....welcome aboard and thanks for your input. I made made a bit of modifcations, but seem to be having a little problem. We're almost there. I'm posting both my source code and also the errors that I get. Thanks.

#include <iomanip>
#include <cmath>
#include <fstream>
#include <string>
#include<string>
#include<iostream>

using namespace std;

void getnumbers(int *num1, int *num2)
{
cout<<"Please enter two numbers to compare "<<endl;
cin>>*num1>>*num2;
cout<<"The two numbers entered in order were "<<num1<<"  and "<<num2<<endl;
}

int findbig(int num1, int num2)
{
if (num1 < num2) 
{
return -1;
} 
else if (num1 > num2) 
{
return 1;
}
}


int main()
{
int num1 = 0;
int num2 = 0;
char again = 'y';
while (again=='y')
{
getnumbers(&num1, &num2)
if (findbig(num1, num2) < 0)
{
cout<< num2<< " is the larger of " <<num1<< " and "<< num2 "\n";
} 
else if (findbig(num1, num2) > 0) 
{
cout<< num1 <<" is the larger of "<< num1<< " and " <<num2 endl "\n";
}
cout<<"Go again?(y/n): ";
cin>>again;
} 
else 
{
return 0;
}
}

The errors:

1>------ Build started: Project: bigone, Configuration: Debug Win32 ------
1>Compiling...
1>bigone.cpp
1>c:\users\documents\visual studio 2005\projects\bigone\bigone\bigone.cpp(42) : error C2143: syntax error : missing ';' before 'if'
1>c:\users\documents\visual studio 2005\projects\bigone\bigone\bigone.cpp(44) : error C2143: syntax error : missing ';' before 'string'
1>c:\users\documents\visual studio 2005\projects\bigone\bigone\bigone.cpp(48) : error C2146: syntax error : missing ';' before identifier 'endl'
1>c:\users\documents\visual studio 2005\projects\bigone\bigone\bigone.cpp(48) : error C2143: syntax error : missing ';' before 'string'
1>c:\users\documents\visual studio 2005\projects\bigone\bigone\bigone.cpp(48) : warning C4551: …
zandiago 115 Nearly a Posting Maven Featured Poster

Ok thx for your input. still having some problems with the compilation.

zandiago 115 Nearly a Posting Maven Featured Poster

A few questions narue...what exactly does the '?' do?

zandiago 115 Nearly a Posting Maven Featured Poster

I'd have loved to use your second option, but my professor is very particular about the format of his assignments...

zandiago 115 Nearly a Posting Maven Featured Poster
#include <iomanip>
#include <cmath>
#include <fstream>
#include <string>
#include<string>
#include<iostream>

using namespace std;


int findbig(int num1, int num2);

{
  return num1 > num2 ? num1 : num2;
}
void getnumbers ( int & num1, int & num2 )
{
  cout<<"Please enter two numbers to compare: ";
  cin>> num1 >> num2;
}

int main()
{
  int num1, num2;

  getnumbers ( num1, num2 );
  cout<< findbig ( num1, num2 ) <<" is the larger of "<< num1<<" and " <<num2<<"\n";
}

	return 0;
}
zandiago 115 Nearly a Posting Maven Featured Poster

I'm thinking perhaps because we're using different compilers. Also, just a side-question. I'm aware that C++ is used to create programs like these and other tools that would be very repetitive for a human to do, such as certain calcualtions, can we create c++ programs to do other internal stuff? By that i mean, can you create a c++ program to shutdown your computer or to lauch internet explorer?

zandiago 115 Nearly a Posting Maven Featured Poster

Thx for your prompt reply Narue, we're almost there, however, if I compile using your suggested format...i get the following error:

1>------ Build started: Project: bigone, Configuration: Debug Win32 ------
1>Compiling...
1>bigone.cpp
1>c:\users\documents\visual studio 2005\projects\bigone\bigone\bigone.cpp(16) : error C2447: '{' : missing function header (old-style formal list?)
1>Build log was saved at "file://c:\Users\Documents\Visual Studio 2005\Projects\bigone\bigone\Debug\BuildLog.htm"
1>bigone - 1 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
zandiago 115 Nearly a Posting Maven Featured Poster

HHHmmmmm. I didn't quite get it. I still got problems. Below is my revised code:

#include <iomanip>
#include <cmath>
#include <fstream>
#include <string>
#include<string>
#include<iostream>

using namespace std;

int num1, num2;

int findbig(int num1, int num2);

int main()
{
	char again = 'y';
		
	while (again=='y')
	{
	cout<<"Please enter two numbers to compare "<<endl;
	cin>>num1>>num2;
	cout<<"The two numbers entered in order were "<<num1<<" and "<<num2<<endl;
	}
	void getnumbers(int num1, int num2);
	
		if (num1<num2)
		int x = findbig(num1, num2);
		cout<<num2<<" is the larger of "<<num1<< " and "<<num2<<endl;
	
	else if (num1>num2)
	{
		cout<<num1<<" is the larger of "<<num1<< " and "<<num2<<endl;
	}
	cout<<"\n Go again?(y/n): ";
	cin>>again;
	
	return 0;
}
zandiago 115 Nearly a Posting Maven Featured Poster

Thanks you guys, problem solved. Time to go on to my other threads. see you around.

zandiago 115 Nearly a Posting Maven Featured Poster

Thanks for the link. If i understand correctly, it shoukd look something like this:

#include <iomanip>
#include <cmath>
#include <fstream>
#include <string>
#include<string>
#include<iostream>
#include<iomanip>

using namespace std;

int main()
{
	ifstream infile;
	ofstream outfile;

	infile.open ("word.txt");
	outfile.open ("wordOutput");

	string phrase = "lover";

	
		phrase.erase(0,1);
			cout<<phrase<<endl;

		phrase.insert(4,"%");
			cout<<phrase<<endl;

		phrase.replace(4,"%",7,8,"#");
			cout<<phrase<<endl;
	
		return 0;
}

I get the following error message:

1>------ Build started: Project: wmanip, Configuration: Debug Win32 ------
1>Compiling...
1>wmanip.cpp
1>c:\users\documents\visual studio 2005\projects\wmanip\wmanip\wmanip.cpp(32) : error C2664: 'std::basic_string<_Elem,_Traits,_Ax> &std::basic_string<_Elem,_Traits,_Ax>::replace(__w64 unsigned int,__w64 unsigned int,const std::basic_string<_Elem,_Traits,_Ax> &,__w64 unsigned int,__w64 unsigned int)' : cannot convert parameter 2 from 'const char [2]' to '__w64 unsigned int'
1>        with
1>        [
1>            _Elem=char,
1>            _Traits=std::char_traits<char>,
1>            _Ax=std::allocator<char>
1>        ]
1>        There is no context in which this conversion is possible
1>Build log was saved at "file://c:\Users\Documents\Visual Studio 2005\Projects\wmanip\wmanip\Debug\BuildLog.htm"
1>wmanip - 1 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
zandiago 115 Nearly a Posting Maven Featured Poster

Ok thx for the feedback, however, I've completed programs with the use of the getline function and it works ok. In other words what makes the difference between the use of (infile>>number) and (getline(infile,number,'\n')) in this particualr program?

zandiago 115 Nearly a Posting Maven Featured Poster
#include <iomanip>
#include <cmath>
#include <fstream>
#include <string>
#include<string>
#include<iostream>
#include<iomanip>

using namespace std;

int main()
{
	ifstream infile;
	ofstream outfile;

	infile.open ("word.txt");
	outfile.open ("wordOutput");

	string phrase = "lover";

	
		phrase.erase(0,1);
			cout<<phrase<<endl;

		phrase.insert(4,"%");
			cout<<phrase<<endl;

		phrase.replace(4,"%");
		phrase.replace(7,8,"#");
			cout<<phrase<<endl;
	
		return 0;
}

Thanks for the link Ancient Dragon. Above is the modified code. Instead of making it read from the infile, i wanted to test the prgram first, then deal witha any infile problems later. The error message:

1>------ Build started: Project: wmanip, Configuration: Debug Win32 ------
1>Compiling...
1>wmanip.cpp
1>c:\users\brown\documents\visual studio 2005\projects\wmanip\wmanip\wmanip.cpp(32) : error C2661: 'std::basic_string<_Elem,_Traits,_Ax>::replace' : no overloaded function takes 2 arguments
1>        with
1>        [
1>            _Elem=char,
1>            _Traits=std::char_traits<char>,
1>            _Ax=std::allocator<char>
1>        ]
1>Build log was saved at "file://c:\Users\Brown\Documents\Visual Studio 2005\Projects\wmanip\wmanip\Debug\BuildLog.htm"
1>wmanip - 1 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

Thanks for your input.

zandiago 115 Nearly a Posting Maven Featured Poster
#include <iomanip>
#include <cmath>
#include <fstream>
#include <string>
#include<string>
#include<iostream>
#include<iomanip>

using namespace std;

int main()
{
	ifstream infile;
	ofstream outfile;

	int num;//number of grades
	int Hi;//highest test grade
	int Low;//lowest test grade
	sting stat;//status of grade, whether higher or lower than avverage

	infile.open ("grades.txt");
	outfile.open ("gradeOutput");

	double number;//the grades as in the infile

	while (getline(infile,number,'\n'))
	{	
		cout<<"The number of test scores : "<<num<<endl;
		double average = (number/num);//average of all the grades
		cout<<"The average of the test scores : "<<average<<endl;
		cout<<"The highest test score was "<<Hi<<" and the lowest test grade was "<<Low<<endl;
		cout<<"Grade "<<setw(5)<<"Status"<<endl;

		if (number<average)
		{
		cout<<number<<setw(5)<<" Below"<<endl;
		}
		else if (number>average)
		{
		cout<<number<<setw(5)<<" Above"<<endl;
	}
	
	return 0;
}

The assignment is as follows:
Write a c++ program USING FUNCTIONS, that will read in an unknown number (not
more than 60) of test grades from a text file named "functest.txt"(make your own). The
program is to calculate and output the following:
1. Number of Test Grades
2. Average of the Test Grades ( 2 decimal places)
3. The Highest and Lowest Test Grades
4. A list of the grades and whether the grade is ABOVE or BELOW the
average.
The grade and status should take the following format:
Grade Status
XX ABOVE
XX BELOW
etc.
5. Output the results of all the calculations
You may assume that no grade will be exactly equal to the average.

A few things:
1. …

zandiago 115 Nearly a Posting Maven Featured Poster

with regards to the syntax errors, how could manipulate the same word without re-declaring(if there is such a word) it as another string?

zandiago 115 Nearly a Posting Maven Featured Poster

Write a c++ program that will read in, from a file entitled "word.txt", an unknown
number of single words (no spaces ). The program will then print out the
word, move 2 tabs to the right, display the word with the first letter
removed, move 2 tabs to the right, display the adjusted word with a
percent sign ( % ) inserted between the 3rd and 4th characters, move 2
tabs to the right, and finally display the new adjusted word with a pound
sign ( #) replacing the final letter of the word. Look at my code below and tell me what i'm doing wrong.
Output is to both the screen and the printer.

Example of output:
backups ackups ack%ups ack%up#

My infile is:

rumpler
harmony
gidgets
fromage
squares
pancake
lexicon
piglets
singles
program
printer
happily
offices
windows
express
poisons

The code that I have thus far is:

#include <iomanip>
#include <cmath>
#include <fstream>
#include <string>
#include<string>
#include<iostream>
#include<iomanip>

using namespace std;

int main()
{
	ifstream infile;
	ofstream outfile;

	infile.open ("word.txt");
	outfile.open ("wordOutput");

	string phrase;

	while (getline(infile,phrase,'\n'))
	{
		phrase.erase(0,1)
			cout<<phrase<<endl;

		phrase.insert(4,"%");
			cout<<phrase<<endl;

		phrase.replace(7,"#")
			cout<<phrase<<endl;
	}
		return 0;
}
zandiago 115 Nearly a Posting Maven Featured Poster
#include <iomanip>
#include <cmath>
#include <fstream>
#include <string>
#include<string>
#include<iostream>

using namespace std;

int main()
{
	int num1 = 0;
	int num2 = 0;
	char again = 'y';
	while (again=='y')
	{
	cout<<"Please enter two numbers to compare "<<endl;
	cin>>num1>>num2;
	cout<<"The two numbers entered in order were "<<num1<<" and "<<num2<<endl;
	if (num1<num2)
	{
		cout<<num2<<" is the larger of "<<num1<< " and "<<num2<<endl;
	}
	else if (num1>num2)
	{
		cout<<num1<<" is the larger of "<<num1<< " and "<<num2<<endl;
	}
	cout<<"\n Go again?(y/n): ";
	cin>>again;
	}
	
	return 0;
}

Good day. My assignment is as follows: Write a c++ program using functions, that will accept 2 numbers from the keyboard and then determine which is
the larger and smaller of the two. There should be two functions:
1. getnumbers

Output within the 1st function should display
The two numbers entered in order were XXX and YYY

2. findbig
Output within the 2nd function should display
XXX is the larger of XXX and YYY
Put the main function within an "again" loop that will continue until the user no longer wants to.(skip a line between each sets output).
Could you please explain to me how i'd go about creating two such functions? I had a bit of problem grasping the concept of functions....thanks. The above program does work, but it doesn't have the two distinct functions as is requested.

zandiago 115 Nearly a Posting Maven Featured Poster

Ok kool, thanks for the reply. however, i had thought the games on the calculator were .exe...so i had thought it would have ran .exe programs.

zandiago 115 Nearly a Posting Maven Featured Poster

Good day. I recently purchased a TI-84 calculator and realized that it has some programming commands as a c++ compiler would. Is it possible to load a c++ program on a ti-84 calculator...thx

zandiago 115 Nearly a Posting Maven Featured Poster

If you want to try it out the command is

Beep (fequency in cycles, duration in milliseconds); // The capital letter 'B' is mandatory

An additional compiler directive is needed:
#include <windows.h>

Beep(1000, 2000); will make a sound of 1000 cycles for 2 seconds

zandiago 115 Nearly a Posting Maven Featured Poster

Hello there, i don't if this will solve your problem. but a few things. In addition to viruses, your computer may be infected with spywares, Trojans, worms, adwares, viruses and other malwares. I recomend XoftSpySE and a registry cleaner. I had a similar problem, after cleaning the registry, my internet explorer was running brand new. The software to help you with your registry: RegCure and Regpair. Some of the above mentioned programs can be downloaded at www.cnet.com. Please use these utilities and let’s know the outcome. Also, there are softwares out there such as “Explorer Repair” that resets your TCP/IP settings, deletes ARP Cache, repair your host files, checks your winsock files . Do the following to post a hi-jack log which we'll address for you, you must first download the software from:http://www.download.com/HijackThis/3...-10379544.html ==download hijackthis: http://www.majorgeeks.com/download5554.html
-install it to a new folder alongside your program files and then... rename hijackthis .exe to imabunny.exe
-in that folder start HijackThis by dclicking the .exe; now close ALL other applications and any open windows including the explorer window containing HijackThis.
-click the Scan and Save a Logfile button.
Post the log here so that we can take a look at it. Have a good day.
This however should be posted in the viruses/nasties forum.

zandiago 115 Nearly a Posting Maven Featured Poster

ooookkkkk then....... so michael jackson or this guy: http://www.youtube.com/watch?v=LbvP7dT3Dx0

zandiago 115 Nearly a Posting Maven Featured Poster

Format hard-drive from start-up and as caperjack said.....re-install.

zandiago 115 Nearly a Posting Maven Featured Poster

well, in addition to cost, you may wanna take into consideration what you're going to be using the PC for, for example if you're a PC gamer, you'll want to think about grapics (monitor size), memory, processor speed, weight, wirless and battery power....just to name a few. Personally, i've had no problems with DELL, you can get great deals from them with decent specs. The SONY is pretty kool too.

zandiago 115 Nearly a Posting Maven Featured Poster

have you tried anything? i personally recomend learning c++. For exampley, i have a c++ game where it the compiler generates a random # and asks the user to guess until, they found the right number. It's kinna kool game.....was that what you were kinna looking for?

zandiago 115 Nearly a Posting Maven Featured Poster

Problem solved...thx again to ya'll. See you soon.

zandiago 115 Nearly a Posting Maven Featured Poster

Ok....got it, thx very much for your assistance...all i have to do now is redo the mathematical part of the program which is giving me a pain. Thx again...i'm almost there.

zandiago 115 Nearly a Posting Maven Featured Poster

I did the modifications:

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

using namespace std;



int main()
{

	int a;//variable for switch statement
	double ht = 0.0;//height
	double radB = 0.0;//radius of sphere
	double radR = 0.0;//radius of rod
	double radC = 0.0;//radius cone
	double wt = 0.0;//width
	double lt = 0.0;//length
	double wh = 0.0;//radius of wheel
	const double pie = 3.14159;//pie
	double volsp = (4.0/3.0) * (radB * radB * radB) * pie;//volume of a sphere
	double volcy = pie * (radR * radR) * ht;//volume of cylinder/rod
	double volcn = (1.0/3.0) * (radC * radC) * pie * ht;//volume of cone
	char again = 'y';


	while (again == 'y')
	{
	cout << "Do you want the volume of:\n";
	cout << "1. Dumbbell \n";
	cout << "2. Axle \n";
	cout << "3. Spear \n";

	
	{

		cin>>a;
		switch(a){
				case 1:	
			cout<<"Enter radius of Sphere ";
			cin>>radB;
			cout<<"Enter radius of rod ";
			cin>>radR;
			cout<<"Enter length of rod ";
	        cin>>lt;
			double volsp = (4.0/3.0) * (radB * radB * radB) * pie;//volume of a sphere
			double volcy = pie * (radR * radR) * ht;//volume of cylinder/rod
			double volcn = (1.0/3.0) * (radC * radC) * pie * ht;//volume of cone
			double dumbbell = (volcy) + (volsp * 2.0);
			cout<<"The volume of the dumbbell is "<<dumbbell<<" cubic inches"<<endl;
			break;
			
		}

		
		cin>>b;
				
			case 2:
				{
			cout<<"Enter radius of wheel ";
			cin>>wh;
			cout<<"Enter radius of rod ";
			cin>>radR;
			cout<<"Enter length of rod ";
	        cin>>lt;
			cout<<"Enter width of wheel ";
			cin>>wt;
			double volsp …
zandiago 115 Nearly a Posting Maven Featured Poster

Ok thx for your prompt reply, im also having a bit of problems with te calcualtions, after the corrections i'll submit my new code.

zandiago 115 Nearly a Posting Maven Featured Poster

Just calm down and think about about it. Use a flow chart to get some ideas and then post your code that you've tried. Looks like in this code, they may be a need for if/else statements. The only way to be successful in programming is to try and get corrected constantly.

zandiago 115 Nearly a Posting Maven Featured Poster

I'm not really sure how to modify the program so that after the user calcualtes the volume of one object the program automatically goes back to the menu?

zandiago 115 Nearly a Posting Maven Featured Poster

i'd love to use functions, howver, we haven't reached that section, so our professor won't accept any work with functions.

zandiago 115 Nearly a Posting Maven Featured Poster

welcome aboard...i could write a book about u jennifer...just joking

zandiago 115 Nearly a Posting Maven Featured Poster

Nice to have you aboard. You've got an interesting country there...quite diversed.

zandiago 115 Nearly a Posting Maven Featured Poster
#include <cmath>
#include <fstream>
#include <string>
#include <iostream>

using namespace std;



int main()
{

	int a,b,c;
	double ht = 0;//height
	double radB = 0;//radius of sphere
	double radR = 0;//radius of rod
	double radC = 0;//radius cone
	double wt = 0;//width
	double lt = 0;//length
	double wh = 0;//radius of wheel
	const double pie = 3.14159;//pie
	double volsp = (4.0/3) * (radB * radB * radB) * pie;//volume of a sphere
	double volcy = pie * (radR * radR) * ht;//volume of cylinder/rod
	double volcn = (1.0/3) * (radC * radC) * pie * ht;//volume of cone
	char again = 'y';

	cout << "Do you want the volume of:\n";
	cout << "1. Dumbbell \n";
	cout << "2. Axle \n";
	cout << "3. Spear \n";

	while (again == 'y')
	{
	cin >> a;
	    switch (a)
	    {
			case 1:
			cout<<"Enter radius of Sphere ";
			cin>>radB;
			cout<<"Enter radius of rod ";
			cin>>radR;
			cout<<"Enter length of rod ";
	        cin>>lt;
			double volsp = (4.0/3) * (radB * radB * radB) * pie;//volume of a sphere
			double volcy = pie * (radR * radR) * ht;//volume of cylinder/rod
			double volcn = (1.0/3) * (radC * radC) * pie * ht;//volume of cone
			double dumbbell = (volcy) + (volsp * 2);
			cout<<"The volume of the dumbbell is "<<dumbbell<<" cubic inches"<<endl;
			break;
		}

	cin>>b;
		case 2:
		{			
			cout<<"Enter radius of wheel ";
			cin>>wh;
			cout<<"Enter radius of rod ";
			cin>>radR;
			cout<<"Enter length of rod ";
	        cin>>lt;
			cout<<"Enter width of wheel ";
			cin>>wt;
			double volsp = (4.0/3) * (radB …
zandiago 115 Nearly a Posting Maven Featured Poster

No

You think WWIII will be within the next 5 years?

zandiago 115 Nearly a Posting Maven Featured Poster

What's the purpose of the '^' (carot) symbol in C\C++?

zandiago 115 Nearly a Posting Maven Featured Poster

YES!!!!

would you like to visit the international space station?

zandiago 115 Nearly a Posting Maven Featured Poster
zandiago 115 Nearly a Posting Maven Featured Poster

I'll check around, i know someone who did it recently. You may also want to check the following to see if they help you: http://www.codeguru.com/Cpp/G-M/multimedia...icle.php/c4739/

There is a playsound() function that will may sound files....but i think it has a limit of 100kb.

zandiago 115 Nearly a Posting Maven Featured Poster

well said narue...but by the way, he never told why it's wrong to break out of a for loop..he just said, don't do it. Any reasons why people may say, never to break out of a for loop since you'll get the same result?

zandiago 115 Nearly a Posting Maven Featured Poster

Are most computer science professors that incompetent?

..To be honest, it's unfortunate, you learn more from Google and the forum, than these instructors...it's sad. Neither did i know about the airplane algorithim. For example, on one of the programs, I used a 'break' with a 'for' loop. The program compiled ok, but i lost point because he said, never to break out of a 'for' loop. The point is...the program still worked...

zandiago 115 Nearly a Posting Maven Featured Poster

Hhhhmmmmm...if you're unable to turn on your fire-wall, I do recommend that you clean/restore your registry files…if these are corrupted, your PC will slow down. The software to help you with your registry: RegCure and Regpair. Some of the above mentioned programs can be downloaded at www.cnet.com. Also, there are softwares out there such as “Explorer Repair” that resets your TCP/IP settings, deletes ARP Cache, repair your host files, checks your winsock files . You can also, download other fire-wall software, if the one that comes with ur PC doesn’t. Additionally,after completing the above mentioned suggestions, you may want to ping to test connectivity or other ways to troubleshoot your network.

zandiago 115 Nearly a Posting Maven Featured Poster
#include <cmath>
#include <fstream>
#include <string>
#include <iostream>

using namespace std;



int main()
{

	int a,b,c;
	int ht = 0;//height
	int radB = 0;//radius of sphere
	int radR = 0;//radius of rod
	int radC = 0;//radius cone
	int wt = 0;//width
	int lt = 0;//length
	int wh = 0;//radius of wheel
	const double pie = 3.14159;//pie
	double volsp = (4.0/3) * (radB * radB * radB) * pie;//volume of a sphere
	double volcy = pie * (radR * radR) * ht;//volume of cylinder/rod
	double volcn = (1.0/3) * (radC * radC) * pie * ht;//volume of cone

	cout << "Do you want the volume of:\n";
	cout << "1. Dumbbell \n";
	cout << "2. Axle \n";
	cout << "3. Spear \n";

	cin >> a;
	    switch (a)
	    {
			case 1:
			cout<<"Enter radius of Sphere ";
			cin>>radB;
			cout<<"Enter radius of rod ";
			cin>>radR;
			cout<<"Enter length of rod ";
	        cin>>lt;
			float dumbbell = (volcy) + (volsp * 2);
			cout<<"The volume of the dumbbell is "<<dumbbell<<" cubic inches"<<endl;
		}

	cin >>b;
		switch (b)
		{
			case 2:
			cout<<"Enter radius of wheel ";
			cin>>wh;
			cout<<"Enter radius of rod ";
			cin>>radR;
			cout<<"Enter length of rod ";
	        cin>>lt;
			cout<<"Enter width of wheel ";
			cin>>wt;

			
			cout<<"The volume of the axle is "<<axle<<" cubic inches"<<endl;
		}

	cin >> c;
		switch (c)
		{
			case 3:
			cout<<"Enter radius of rod ";
			cin>>radR;
			cout<<"Enter length of rod ";
	        cin>>lt;
			cout<<"Enter height of cone ";
			cin>>ht;

			
			cout<<"The volume of the spear is "<<spear<<"cubic inches"<<endl;
		}
				
	return 0;
}

Ok, so i made a bit …