How do i divide in c++. I ask because my program doesnt give me the right output. I use the dev compiler ver 5 beta.
example:
I get this:Code:#include <iostream>
#include <fstream>
#include <stdlib.h>
using namespace std;
int main()
{
float a;
int x, y;
cout<<"enter two numbers:";
cin>>x>>y;
ofstream file("a.txt",ios::app);
a = x/y;
file<<a;
}
0
Is this right?