Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- int main()
- {
- int n, a;
- float s1=0, s2=0;
- std:: cin >> n;
- for(int i=1; i<=n; i++)
- {
- std:: cin >> a;
- s1=s1+a;
- s2=s2+(1/s1);
- }
- std:: cout << "Suma je: " << s2;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement