Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<iostream>
- using namespace std;
- int main()
- {
- //var
- double num;
- double sum = 0;
- //code
- for(num = 0.01; num <= 1.0; num += 0.01)
- {
- sum += num;
- }
- cout << "The sum is " << sum << endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement