Chapter 10 Exercise Set 1: CPE PracticeΒΆ
What is the output of the following program?
#include <iostream> using namespace std; int main() { int i = 0; for (float f = .008; f < 1e2; f *= 1e1) i++; cout << i << endl; return 0; }
2
3
4
5
What is the output of the following program?
#include <iostream>
using namespace std;
int main() {
int i = 0;
for (float f = .008; f < 1e2; f *= 1e1)
i++;
cout << i << endl;
return 0;
}
2
3
4
5