cout<<"Enter a number for A";
cin>>A;
cout<<"Enter a number for B";
cin>>B;
cout<<"Enter a number for C";
cin>>C;
cout<<"Enter a number for D";
cin>>D;
cout<<"When your numbers are applied to the formula a(b+c)–d^3 you get";
cout<< A*(B+C)-D^3 <<;
system("pause");
}
Getting Error: "expected primary expression before ";" token
23 C:\DOCUME~1\Steven\LOCALS~1\Temp\C++ 3 start.cpp no match for 'operator^' in '(&std::cout)->std::basic_ostream<_CharT, _Traits>::operator<< [with _CharT = char, _Traits = std::char_traits<char>]((((B + C) * A) - D)) ^ 3'
Well i use turbo c++.I would have never used "using namespace std". But first try adding <stdlib.h> header and <math.h> and then
cout<< A*(B+C)-D^3 <<; should be cout<< A*(B+C)-pow(D,3) ;
#include <iostream>
#include <math.h>
usingnamespace std;
int main()
{
int A;
int B;
int C;
int D;
cout<<"Enter a number for A: ";
cin>>A;
cout<<"Enter a number for B: ";
cin>>B;
cout<<"Enter a number for C: ";
cin>>C;
cout<<"Enter a number for D: ";
cin>>D;
cout<<"When your numbers are applied to the formula a(b+c)–d^3 you get: ";
cout<< A*(B+C)-pow(double(D),3) << endl; //for pow(double base, double exponent).
//So you need to change your D from int to double
system("pause");
return 0;
}