3 years ago, one brother solved this problem, i need this program to make some calculation. actually, i have some fractional/decimal component t (like 2.0213, 3.047) this program can only take integer. Can anybody please help me !!!
#include<iostream>
#include<fstream>
#include<string>
#include<cstdlib>
#include<cmath>
#include<iomanip>
#include <windows.h>
using namespace std;
//void calculateAverage();
//int calculateGrade();
//void updateFrequency();
int main()
{
const int size=25;
int debug=size;
int test1[size], test2[size];
ifstream infile;
for(int i=0;i<size;i++)
{
test1[i]=0;
test2[i]=0;
}
cout<<"Reading from file ''input.txt''..."<<endl;
infile.open("input.txt");
while(size==debug)
{
for(int i=0;i<size;i++)
{
infile>>test1[i];
infile>>test2[i];
}
debug--;
}
for(int i=0;i<size;i++)
{
cout<<test1[i]<<" "<<test2[i]<<" "<<endl;
}
infile.close();
system("pause");
return 0;
}