8 kyu

Parse nice int from char problem

9,942 of 95,180Joz

Description:

You ask a small girl,"How old are you?" She always says, "x years old", where x is a random number between 0 and 9.

Write a program that returns the girl's age (0-9) as an integer.

Assume the test input string is always a valid string. For example, the test input may be "1 year old" or "5 years old". The first character in the string is always a number.

Fundamentals

Stats:

CreatedJun 14, 2015
PublishedJun 14, 2015
Warriors Trained122845
Total Skips7417
Total Code Submissions185110
Total Times Completed95180
Java Completions9942
JavaScript Completions33129
Clojure Completions443
Python Completions29788
CoffeeScript Completions39
Ruby Completions1962
C Completions2578
PHP Completions2788
C# Completions4280
TypeScript Completions1813
Rust Completions1836
Haskell Completions447
NASM Completions88
Kotlin Completions2248
C++ Completions6421
COBOL Completions42
Scala Completions142
RISC-V Completions18
Lua Completions80
Total Stars411
% of votes with a positive feedback rating87% of 6411
Total "Very Satisfied" Votes5022
Total "Somewhat Satisfied" Votes1126
Total "Not Satisfied" Votes263
Ad
Contributors
  • Joz Avatar
  • Javatlacati Avatar
  • Unnamed Avatar
  • GiacomoSorbi Avatar
  • smile67 Avatar
  • TheLilDev Avatar
  • siebenschlaefer Avatar
  • Chrono79 Avatar
  • JohanWiltink Avatar
  • ThorstenLudwig Avatar
  • Voile Avatar
  • Souzooka Avatar
  • peppertom Avatar
  • user3155103 Avatar
  • AJFarmar Avatar
  • hobovsky Avatar
  • uniapi Avatar
  • malandr Avatar
  • MikChan Avatar
  • ejini战神 Avatar
  • akar-0 Avatar
  • anthonypz Avatar
  • KayleighWasTaken Avatar
  • metatable Avatar
Ad