Hello All,
I'm very new to C++ and programming in general and am having probelms with an assignment i have been set. I've been using ?Blood dev C++? ( i dont know if this is any good?) I have basically finished the program and am getting one syntax error that i cannot figure out. In desperation i post here in order to pick your brains :o
Essentially the problems is on line 54:
int twentynote = int rtotal / 2000; // work out if various amounts fit.
the error as it it shows on screen:
in function 'int main(int, char**)':
syntax error before '/' token.
I haven't come toask for any help with the coding (no matter how bad it is :D ) just some help with this error would be great. the code is below.
#include <iostream>
#include <stdlib.h>
using namespace std;
int main(int argc, char *argv[])
{
float total;
float flint;
int rtotal;
int twentynote;
int tennote;
int fivenote;
int twocoin;
int onecoin;
int fiftypcoin;
int twentypcoin;
int tenpcoin;
int fivepcoin;
int twopcoin;
int onepcoin;
{
cout<<"\nPlease enter amount required in the format Pounds and Pence '££.pp' ";
cin>>total;
flint = total * 100;
rtotal = (int)flint;
}
do{
int twentynote = int rtotal / 2000; // work out if various amounts fit.
if twentynote > 0
{
int rtotal = int rtotal % 2000;
}
}
{
int tennote = int rtotal / 1000;
if tennote > 0
{
int rtotal = int rtotal % 1000;