Sum of the cubes of the digits

Assignment Help Basic Computer Science
Reference no: EM131039016

Write a program using while loop that can read an integer number and determines whether the sum of the cubes of the digits is equals to the number itself. display a message indicating whether the sum of the cubes is equal or not equal to the number.

For example, if the number 563 is entered as input, the sum of the cubes of the digits is 5^3 + 6^3 + 3^3 = 125+ 216 +27 = 368 which is not equal to 563.

On the other hand, if the number 371 is entered as input, the sum of the cubes of the digits is 3^3 + 7^3 + 1^3 = 27 + 343 + 1 = 371 which equal to 371. The program will be repeated until input number is equal to the sum of the cubes.

Reference no: EM131039016

Questions Cloud

Member of the systems development team : You are a member of the systems development team for XYZ Car Manufacturer. The project manager has tasked you to design an object-oriented modeling for the company vehicle line that consists of cars, minivans, trucks, SUVs, and hybrids. The projec..
Briefly describe the threat : This assignment provides you with an opportunity to read an article about a current security threat (or attack) while also examining how security measures impact the customer experience.
How much was net income for 20x7 and 20x8 : Is total "working capital" reduced on the date of declaration, date of record, and/or date of payment?
The sponsor for project xy : You are the sponsor for project XY. The project manager has provided you the following three status reports. The project started on 2/1 and it is now the end of the 4th week. For this assignment, complete this packet in its entirety to include all..
Sum of the cubes of the digits : Write a program using while loop that can read an integer number and determines whether the sum of the cubes of the digits is equals to the number itself. display a message indicating whether the sum of the cubes is equal or not equal to the numbe..
How much was net income for 20x7 and 20x8 : Is total "working capital" reduced on the date of declaration, date of record, and/or date of payment?
What is the percentage change for each of the given item : What is the percentage change for each item listed? What observations can you make for each item? Is there anything in the annual report that supports your observations?
Is there any income statement impact from these transaction : Believing that its share price was depressed due to general market conditions, Kenya's board of directors authorized the reacquisition of 250,000 shares of common stock. These treasury shares were purchased at $10 per share.
Program that uses a function to toss a thick coin : Write a c++ program that uses a function to toss a thick coin 100 times. The probablility of heads is 0.4, the probability of tails is 0.4 and the probability of the coin landing on its edge is 0.2. The function stores the results in an array.

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Describe at least 1 example use of each technology

Discuss the major differences between these types of networking technologies. Describe at least 1 example use of each technology that utilizes the strengths of that technology.

  Solve decanting problem using euclidean algorithm

Use Euclidean algorithm to solve decanting problem for decanters of sizes 1317 and 1075. Or we can say, determine integers x and y.

  Write a program that reads in an integer

Write a program that reads in an integer and breaks it into a sequence of individual digits in reverse order. For example, the input 16384 is displayed as 4 8 3 6 1 You may assume that the input has no more than five digits and is not negative.

  Prove the identity of the following boolean equations

Prove the identity of the following Boolean equations, using algebraic manipulation: AB + AB' +A'B' = A + 'B 2). Reduce the following Boolean expression to a minimum number of literals: A' B( D' +C' D) + B(A + A'CD) NEED HELP WITH THIS TWO QUESTIO..

  Description of the device

The presentation should include a discussion of 3-5 device alternatives.  Included in the presentation should be a description of the device, including the manufacturer, the model, the seller, the cost, and a summary of the manufacturer specificat..

  Derive the simplest product-of-sums expression

Derive the simplest product-of-sums expression for the function f(x1,x2,x3,x4)= (x1'+x3'+x4')(x2'+x3'+x4)(x1+x2'+x3') HINT: use consensus property.

  Identify the components of data model

Identify the components of data model: Define the entities, primary keys, and relationships that are used to define the data model for your project.

  Sort the array below to ascending order using quick sort

Sort the array below to ascending order using quick sort. Please use the first element in each array/sub-array as the pivot and highlight all the pivots. Note: do not write any code, but you do need to show each step in the sorting process.

  Create an incident-response policy

Create an incident-response policy that covers the development of incident-response team, disaster-recovery processes, and business-continuity planning.

  Find the expected number of jobs in the system at any time

An M/M/1 queuing system spends 30% of the time in the idle state. Find the expected number of jobs in the system at any time.

  Assess an organisation information system

Journal task is to assess an Organisation Information System, and write a report. The assessment should focus on the various components of business systems

  Preventing the type of attack

Deccan Herald titled Hackers holding your PC to ransom Propose two (2) methods that computer users could use to prevent this type of attack.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd