{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

jjf214hw3p4 - "<<less<<endl...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
/* James Feindt jjf214 10/3/10 hw3pa4 Corey Montella 3:10 */ using namespace std; #include<iostream> #include<fstream> #include<cmath> void locate (int&, int&); int main() { double N; int more=0, less=0; cout<<"Enter a number between 1 and 10 for N"<<endl; cin>>N; locate (more, less); cout<<"\nThe value of more is: "<<more<<"\nThe value of less is:
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: "<<less<<endl; cout<<"Quotient of more/N (percentage): "<<(more/N)*100<<endl<<endl; system ("pause"); return 0; } void locate (int& more, int& less) { double a; ifstream datain ("testdata.txt"); datain>>a; while (!datain.fail()) { if (a>0.7) more++; else if (a<0.6) less++; datain>>a; } }...
View Full Document

{[ snackBarMessage ]}

Ask a homework question - tutors are online