No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
This program actually reads in an input expression and using the grammar rule to determine whether the syntax is ok or not. This is a lexical analyzer. I need to be able to read in the input expression and output each token of the expression and it's token kind. I'm … | |
How do I add deletion to my program?????? [CODE]#include <iostream> #include <set> using namespace std; int main () { set<int> myset; set<int>::iterator it; pair<set<int>::iterator,bool> ret; // set some initial values: for (int i=1; i<=5; i++) myset.insert(i*5); ret = myset.insert(15); if (ret.second==false) it=ret.first; myset.insert (it,8); myset.insert (it,9); myset.insert (it,11); int myints[]= … | |
Help me improve this algorithm please, as of now it is calulating the rows of Pascal's Triangle but I need it to calculate the colums and stop at (3,1). for n:= 0 to k do for m:= 0 to n do if m=0 or m=n then A[n,m]:= 1 else A[n,m]:=A[n-1,m-1] … | |
The error is: F:\C ++ Numerical Methods\Newton_Raphson.cpp(199) : fatal error C1004: unexpected end of file found [code=C++] #include <cmath> #include <iostream> using namespace std; double F ( double X ) { return pow ( X, 4) - 9*pow ( X, 3 ) - 2*pow (X, 2) + 120*X - 130; … | |
I have some errors that I can't seem to understand, could someone help me clear up this problem? [CODE=cpp]#include <cmath> #include <iostream> using namespace std; double F ( double X ) { return pow ( X, 4) - 9*pow ( X, 3 ) - 2*pow (X, 2) + 120*X - … | |
I have to write a program that finds the center of gravity. | |
This is the program and I have 5 errors that I can't seem to get rid of, it was a Fortran 95 program that I had to translate into C++. could somone please help me. [code=cplusplus] #include <iostream> using namespace std; int main() { //Declaration and Intialization float XL = … |