Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write C++ program to prompt user to enter a 3-digits number, say 371, to a variable called num. Then store each digit of this inputted

Write C++ program to prompt user to enter a 3-digits number, say 371, to a variable called num. Then store each digit of this inputted number to three different variables called digit1, digit2 and digit3. Hence, when number entered is 371, digit1 is 3, digit2 is 7 and digit3 is 1. Display the value of inputted number followed by digit1, digit2 and digit3. Hint: You have to use / and % operator in this question.

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

Introduction To Constraint Databases

Authors: Peter Revesz

1st Edition

1441931554, 978-1441931559

More Books

Students also viewed these Databases questions