STANAANDREY

bac 27 /iul 2009

Oct 29th, 2019
221
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.31 KB | None | 0 0
  1. #include <iostream>
  2. #include <cstring>
  3. #include <stdio.h>
  4. #include <ctype.h>
  5. #include <stdlib.h>
  6. using namespace std;
  7.  
  8. int main()
  9. {
  10.     char c[12];
  11.     cin >> c;
  12.     char *p = strtok(c, ".");
  13.     int nr1 = atoi(p);
  14.     p = strtok(NULL, ".");
  15.     int nr2 = atoi(p);
  16.     cout << nr1 + nr2;
  17.     return 0;
  18. }
Add Comment
Please, Sign In to add comment