hi plz help with my homework,I have to write a program that gave me an answer:
x-((x^3)/3!)+((x^5)/5!)-...
here's my code. my actual problem is idk how to write 1!,3!,5!,7!,...
#include <cmath>
#include <iostream>
using namespace std;
int main(){
int b,a=0,c,g=1,f=1,x,n=0;
double i,sum=0;
cout<<"x=";
cin>>x;
cout<<"a=";
cin>>a;