Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main()
- {
- int sum = 0;
- for(int i=1; i<=5; i++)
- // i is only visible inside the block
- {
- int value;//value only visible inside the block
- cout << "Value no. "<< i << " ? ";
- cin >> value;
- if(cin)
- cout << " Consegui ler" ;
- sum = sum + value;
- }
- return 0;
- }
Add Comment
Please, Sign In to add comment