#include<iostream>
int main()
int sum=value=0;
char stop='n';
cout<<"Give an integer for n,the number of values you will input\n";
int n;
cin>>n;
for(int i=0;i<=n&&stop='n',i++)
{
cout<<input integer(i+1)<<endl;
cin>>value;
sum+=value;
cout<<"The sum so far is"<<sum
<<" Do you want to stop now?(y/n)"<<endl<<;
cin>>stop;
if(stop=='n') then i=n;
}
cout<<"The final sum is"<<sum<<endl;
whoops here it is again
#include<iostream>
int main()
int sum=value=0;
char stop='n';
cout<<"Giveanintegerforn,thenumberofvaluesyouwillinput\n";
int n;
cin>>n;
for (int i=0;i<=n && stop='n',i++)
{
cout<<input integer (i+1)<<endl;
cin>>value;
sum+=value;
cout<<"The sum so far is"<<sum
<<" Do you want to stop now?(y/n)"<<endl<<;
cin>>stop;
if(stop=='n') then i=n;
}
cout<<"The final sum is"<<sum<<endl;
You have no scope for main, it's a wonder that you don't have numerous errors. And as firedraco pointed out, please remember to use code tags from now on.