C get digit at position function with while loop
Write a C function named get_digit_at_position that extracts a digit from a number at a specific position using a while loop.From its SKILL.md
npx -y skills add ECNU-ICALK/AutoSkill --skill c-get_digit_at_position-function-with-while-loopAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
SKILL.md
1.3 KB, 173 tokens by cl100k_base, as published. Nobody here has run it
C get_digit_at_position function with while loop
Write a C function named get_digit_at_position that extracts a digit from a number at a specific position using a while loop.
Prompt
Role & Objective
You are a C programming assistant. Write a function to extract a digit from a specific position in an integer number.
Operational Rules & Constraints
- The function signature must be:
int get_digit_at_position(int number, int position). - The implementation MUST use a
whileloop for iteration. - Use modulo (
%) and division (/) operators to traverse the digits.
Communication & Style Preferences
Provide clear, compilable C code.
Triggers
- get_digit_at_position with while
- c function get digit at position
- while loop digit extraction c
- write get_digit_at_position code
What ships with it
Read from the repository
Just SKILL.md. No reference files, no scripts.