write a program that writes multiplication of integer and double and in a file using formatted I/O.

#include<iostream>
#include<stdlib.h>
#include<fstream.h>
using namespace std;
int main()
{
int n;
char c=’*';
double d;
cout<<“Enter integer: “;
cin>>n;
cout<<“Enter double value by which u have to multiply the int: “;
cin>>d;
ofstream file(“d:\\test.txt”); // it will create a file of test name on d drive
if(!file)
{
cout<<“File opening error. “;
exit(1);
}
file<<n<<‘ ‘<<c<<‘ ‘<<d<<” = “<<n*d; // writing on file
file.close(); // closing a file
system(“color 61″); // it is used for change the color
cout<<“\nWelcome to www.candcpp.com and www.candcpp.net: \n”;
cout<<“\ncheck your d drive file will be created: \n\n”<<endl;
system(“pause”);
return 0;

}