#include <iostream>
#include <cstring>
#include <cstdlib>
using namespace std;
void extract(const char* data, int &n1, double &n2, bool &ok);
int main() {
char buffer[80];
cin.getline(buffer,80);
int val1;
double val2;
bool extracted;
extract(buffer, val1, val2, extracted);
if (extracted) {
cout << "RECEIVED DATA: " << val1 << " " << val2 << endl;
}
return(0);
}
void extract(const char* data, int &num1, double &num2, bool &ok) {
ok=false;
if (data[0]=='+') {
const char* pointer = data;
while (*pointer!=0 && *pointer!=' ') pointer++;
while (*pointer!=0 && *pointer==' ') pointer++;
if(*pointer!=0) {
num1=atoi(pointer);
while (*pointer!=0 && *pointer!=' ') pointer++;
while (*pointer!=0 && *pointer==' ') pointer++;
if(*pointer!=0) {
num2=atof(pointer);
ok=true;
}
}
} else if (data[0]=='-') {
} else {
cout << "WARNING: data not in expected format!" << endl;
}
}