Error in this code? [c++]

Can anyone find the errors in this code?

1
2
3
4
5
6
7
8
9
10
11
12
13
14
#include <iostream>
using namespace std;

int main()
{
	double number, half;
	cout << "Enter a number and I will divide it\n";
	cout << "in half for you.\n";
	cin >> number;
	half =/ 2;
	cout << fixedpoint << showpoint << half << endl;
	return 0;
}
Is double part of the iostream library? I'm on my cell and I'm pretty noob so I don't know for sure, but try to add this after your iostream:
#include <math.h>

Also, fixedpoint and showpoint are not defined...
Last edited on
You wrote half =/2; in line 10, I think what you meant was half = number / 2;
Also, in line 11, use "fixed" not "fixedpoint"
@belgarionriva

I really do think double is part of iostream library isn't it?

can anyone enlighten please?
double is a built in type
Topic archived. No new replies allowed.