SHOW:
|
|
- or go back to the newest paste.
| 1 | - | #include <cstdio> |
| 1 | + | #include <stdio.h> |
| 2 | - | #include <iostream> |
| 2 | + | #include <stdlib.h> |
| 3 | - | #include <cstdlib> |
| 3 | + | |
| 4 | int main(int argc, char **argv) | |
| 5 | - | using std::cout; |
| 5 | + | |
| 6 | - | using std::endl; |
| 6 | + | |
| 7 | ||
| 8 | if(argc > 1) | |
| 9 | {
| |
| 10 | for(int i = 1; i < argc; i++) | |
| 11 | sum+= atof(argv[i]); | |
| 12 | printf("Sum is %f\n", sum);
| |
| 13 | } else {
| |
| 14 | printf("No Numbers");
| |
| 15 | } | |
| 16 | - | cout<< "Sum is " << sum << endl; |
| 16 | + | |
| 17 | } |