fork download
  1. #include <iostream>
  2. #include<string>
  3. using namespace std;
  4. int isnum(string str)
  5. {
  6. int a=str[0];
  7. if(48<=a&&a<=57)
  8. {
  9. return 1;
  10. }
  11. else 0;
  12. }
  13. int main() {
  14. string str;
  15. // your code goes herehttps://i...content-available-to-author-only...e.com/accFsT#
  16. cin>>str;
  17. int a=str[0];
  18. cout<<a<<endl;
  19. cout<<isnum(str)<<endl;
  20. return 0;
  21. }
Success #stdin #stdout 0s 4776KB
stdin
Raichuy
stdout
82
1