So i have an assignment in which i need to write a program that takes 5 float numbers and creates a file / saves the numbers to the file and then have this file opened and display the sum of the five numbers, here is what i have but for some reason im getting a runtime error, any help would be greatly appreciated as i am a beginner:
#include <iostream>
#include <fstream>
using namespace std;
cin >> "Enter first number " >> num1 >> "Enter second number " >> num2
>> "Enter third number " >> num3 >> "Enter fourth number " >> num4 >>
"Enter fifth number " >> num5;