I want to just take these numbers from the file one by one and assign them to different variables. I tried this just to see if I could get one to work and a get a crazy random number when it should just be 1.
this is the file its connected to:Code:#include <iostream> #include <fstream> using namespace std; int main() { double x; ifstream input; input.open("chap10-Q1_input.txt"); input>>x; cout<<x; return 0; }
Please helpCode:1 7 10 90 95 2 9 8 90 80 3 7 8 70 80 4 5 8 50 70 5 4 0 40 35