Done!
Credit : @AlgirdasPreidžius
#include <iostream>
using namespace std;
int fun() {
string c;
while(cin>>c) {
if(isdigit(c[0]))
return stoi(c);
}
}
int main() {
int a = fun();
cout<<a<<" ";
return 0;
}
3
solved Getting input from user till he enters a number