I am programming using C++, using Microsoft Visual Studio 2005.
here are the errors:
j:\hw2\hw2a-ssabdelm.cpp(23) : error C2143: syntax error : missing ')' before ';'
j:\hw2\hw2a-ssabdelm.cpp(23) : error C2563: mismatch in formal parameter list
j:\hw2\hw2a-ssabdelm.cpp(23) : error C2100: illegal indirection
j:\hw2\hw2a-ssabdelm.cpp(23) : error C2059: syntax error : ')'
j:\hw2\hw2a-ssabdelm.cpp(23) : warning C4552: '*' : operator has no effect; expected operator with side-effect
Build log was saved at "file://c:\Documents and Settings\Sam & Jacqueline\My Documents\Visual Studio 2005\Projects\hw2-ssabdelm\hw2-ssabdelm\Debug\BuildLog.htm"
hw2-ssabdelm - 4 error(s), 1 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
2007-02-12
13:30:00
·
7 answers
·
asked by
S A
3
in
Computers & Internet
➔ Programming & Design
#include
#include
#include
using namespace std;
#define pi 3.14;
int main()
{
char notat;
float vlt;
int freq = 1;
float time=0;
cout <<"Would you like your output in scientific (s) or decimal (d) notation?" <
cin >> notat;
if (notat == 's')
{
cout << "You have chosen scientific notation: " << setiosflags(ios::scientific) << endl;
vlt = sin(2*pi*freq*time);
cout << vlt <
}
else if (notat == 'd')
cout << "You have chosen decimal notation: " <
else
cout <<"You must enter s or d, please re-enter:" <
cin >> notat;
cout <<"You have chosen "<
return 0;
}
2007-02-12
13:41:48 ·
update #1