Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<iostream>
- #include<string>
- using namespace std;
- int main(int argc, char *argv[]){
- cout<<" having "<<argc<<" parameters !";
- int sum=0;
- for(int i=1;i<=argc;i++){
- if(argv[i]!=NULL){
- int term=stoi(argv[i]);
- sum+=term;
- }
- }
- cout<<endl<<" Suma = "<<sum;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement