Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

write the code in c programming language and please show the code on screen to see the right indentations : An integer is divisible by

write the code in c programming language and please show the code on screen to see the right indentations :

image text in transcribed

An integer is divisible by 9 if the sum of its digits is divisible |Example output by 9. Develop a program which will call UDF: int get input(); to prompt the user for an integer and return this user input to main() Call UDF: void display(int val); to display each digit of the integer starting with the rightmost digit. Your program should also determine whether or not the (user-entered) integer is divisible by 9. Testing should include using the following numbers. n 154368 n 621594 n 123456 Enter an integer: 5463 3 6 4 5463 is divisible by 9 Enter an integer: 154367 7 6 3 4 1 154367 is not divisible by 9 Hint: Use the modulus (%) operator to get each digit; then use / to remove the digit. so 154368 % 10 gives 8 and 154368/10 gives 15436, The next digit extracted should be 6, then 3 and son on

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Seven Databases In Seven Weeks A Guide To Modern Databases And The NoSQL Movement

Authors: Eric Redmond ,Jim Wilson

1st Edition

1934356921, 978-1934356920

More Books

Students also viewed these Databases questions

Question

Choosing Your Topic Researching the Topic

Answered: 1 week ago

Question

The Power of Public Speaking Clarifying the

Answered: 1 week ago