I have not understood why did you declare an output stream if it is not used?
And as it follows from you assignment you need calculate the sum of every third integer. In this case why did you declare your variables as float? And what is meaning of variable solution?
The code is incomplete. I've modified it from some code I was using from another assignment. I was asked to put the answers into an output file after calculating.
//execute this code while the test expression is true
}
If you have any doubt on how to use something - Google is your best friend. Google "C++ while example", it should take you to the reference section on this site - there is heaps of stuff there. Also check out examples of using file streams.
I have used quotes because it is psuedo code, however you should use code tags for code, (the <> button on the right under format, so it looks like this:
1 2 3 4 5 6 7 8 9 10 11 12
#include <fstream>
#include <iostream>
#include <iomanip>
usingnamespace std;
int main ()
{
ifstream InFile;;
int num;
int count=1;
int sum=0;