Advertisement
Guest User

Untitled

a guest
Mar 20th, 2019
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.24 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4. {
  5.  
  6.  
  7. int main()
  8. int n, V[50], i, s=0 ;
  9. cout <<"n="; cin>>n;
  10. for (i=1; i<=n; i++)
  11.  
  12. {cout <<"V[" <<i<<"]=";
  13. cin>> V[i];
  14. if(V[i]%2==1)
  15. s=s+V[i];}
  16. cout s;
  17. return 0;
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement