Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <cstring>
- #include <stdio.h>
- #include <ctype.h>
- #include <stdlib.h>
- using namespace std;
- int main()
- {
- char c[12];
- cin >> c;
- char *p = strtok(c, ".");
- int nr1 = atoi(p);
- p = strtok(NULL, ".");
- int nr2 = atoi(p);
- cout << nr1 + nr2;
- return 0;
- }
Add Comment
Please, Sign In to add comment