Advertisement
im making a program that wil list the trig functions by increments of 10..and i dont have a compiler program. I am using Visual Studio.NET
#include <iostream.h>
#include <math.h>
void main
float degrees, Sin, Cos, Tan;
cout << "Enter a number of degrees: ";
cin >> degrees;
cos = cos(degrees*180/3.14);
cout << "Cosine: " << cosine << endl;
cout << "Sine: " << sin(degrees*180/3.14);
cout << "Tangent:" << tan(degrees*180/3.14);
do {
cout << "Enter degrees: ";
cin >> degrees;
cout << "Sin";
cin >> sin;
cout << "Cos";
cin >> Cos;
cout << "Tan";
cin >> Tan;
counter = degrees;
cout << setw( 10 ) << "Degrees"
<< setw ( 20 ) << "sine"
<< setw ( 20 ) << "cosine"
<< setw ( 20 ) << "Tangent"
<< "\n";
while( counter <= Sin, Cos, Tan)
{
cout << setw( 10 ) << degrees
<< setw ( 20 ) << sine, cosine, tangent
<< "\n";
counter = counter + 10;
}// end while
cout << "\nDo you want to do this again?(y/n) ";
}// end main
when its done its suppose to look like this..
Degrees Sin Cos Tan
with the list of degrees from 0-360 and the sin, cos and tan of that degree.
#include <iostream.h>
#include <math.h>
void main
float degrees, Sin, Cos, Tan;
cout << "Enter a number of degrees: ";
cin >> degrees;
cos = cos(degrees*180/3.14);
cout << "Cosine: " << cosine << endl;
cout << "Sine: " << sin(degrees*180/3.14);
cout << "Tangent:" << tan(degrees*180/3.14);
do {
cout << "Enter degrees: ";
cin >> degrees;
cout << "Sin";
cin >> sin;
cout << "Cos";
cin >> Cos;
cout << "Tan";
cin >> Tan;
counter = degrees;
cout << setw( 10 ) << "Degrees"
<< setw ( 20 ) << "sine"
<< setw ( 20 ) << "cosine"
<< setw ( 20 ) << "Tangent"
<< "\n";
while( counter <= Sin, Cos, Tan)
{
cout << setw( 10 ) << degrees
<< setw ( 20 ) << sine, cosine, tangent
<< "\n";
counter = counter + 10;
}// end while
cout << "\nDo you want to do this again?(y/n) ";
}// end main
when its done its suppose to look like this..
Degrees Sin Cos Tan
with the list of degrees from 0-360 and the sin, cos and tan of that degree.
Advertisement
Advertisement
-
Unsu...
Re: need quick help
Sun, June 19, 2005 - 4:59 PM>i dont have a compiler program. I am using Visual Studio.NET
So which is it? You do or you don't? -
-
Re: need quick help
Sun, June 19, 2005 - 7:57 PMi dont think i do.. In VS.NEt I cannot find the complier for it..im reduced to spending class time fixing my program and catching up on what i miss. In class im using Turbo C++..the book that the Professor suggest came with Visual Studios..but it doesnt work like Turbo. -
-
Re: need quick help
Mon, June 20, 2005 - 5:48 PMNo compiler???
Reinstall VS.net Just make sure you get everything not just the Visual Basic, C# and java crap. Or is there some bastardized "educational" version that is totally crippled. Once upon a time educational versions of VS required a ton of .dlls to go with you're executable so you wouldn't really want to ship a commercial piece of software made with it. Turbo is free now but you will need to go through a few hoops to get it work as you need. Not the best thing to wrestle with when you're just getting started. -
-
Unsu...
Re: need quick help
Mon, June 20, 2005 - 6:08 PMNo compiler sounds fishy to me too. Even if it's an education version, it doesn't make much sense to remove the compiler. Without the compiler it's just a very feature-rich Notepad.
IIRC, in VS.net you have to create a project to get the compiler option. I would just create a console project and then replace whatever they give you with your own code. Then you should get "Compile" under the "Build" menu, or Ctrl+F7 (not 100% sure about the key combo). -
-
Re: need quick help
Mon, June 20, 2005 - 6:14 PMActually, I find VS .net to be a cryptic piece of crap, old VS was fairly straightforward. Ctrl-Shift-B my ass.
Might simply be the "solution" has not been set up correctly to build. -
-
Unsu...
Re: Actually, I find VS .net to be a cryptic piece of crap
Mon, June 20, 2005 - 6:37 PMI couldn't have put it better myself.
-
Re: need quick help
Wed, June 22, 2005 - 3:03 PMtry SharpDevelop
www.icsharpcode.net/OpenSource/SD/
truth, I prefer VS.NET, I use VS.NET at work and SharpDevelop at home. But maybe you'll like it. -
-
Re: need quick help
Wed, June 22, 2005 - 5:28 PMProbably not going to help him much learning C++ in school. Best sticking to what is expected or he won't be getting much help from teachers or classmates. At home I'd rather use old VS for console32 quick utilities or C++ Builder for real Windows apps. Matter of fact, I'd prefer that at work too but VS.NET is the only option for most development there.
Too bad Borland dropped the ball on C++ Builder. Now it seems they simply want to ream any old customers who need to stay with it to update their legacy apps. Especially considering I paid $130 for C++ Builder 4 Professional in the full retail box.
-
-
-
-
-
-