Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- int main(int argc, char **argv)
- {
- double sum=0;
- if(argc > 1)
- {
- for(int i = 1; i < argc; i++)
- sum+= atof(argv[i]);
- printf("Sum is %f\n", sum);
- } else {
- printf("No Numbers");
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement