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

  Write a program in c++ for a server

Write a program in C++ for a server (called math solver) which solves three math problems: factorial (i.e. n!), exponent with base 2 (i.e. 2n), and cube (i.e. n3).

  Explain the open systems interconnection protocol model

1.  Explain the Open Systems Interconnection protocol model. and references with it. 2.  for the network layer of the OSI, what is happening there??

  Identify a recent moral dilemma or ethically questionable

Identify a recent moral dilemma or ethically questionable situation relating to ICT - use the Doing Ethics Technique (DET), ensuring you address each of the DET questions;

  Boolean variable called wantstoppings

After reading the input character, the program shall assign a value to a Boolean variable called  wantsToppings ( true  for a customer who wants toppings,  false  for a customer who does not).

  Drivers for digital dashboards found in automobiles

Believe or not digital dashboards can be found in automobiles. In fact, Mossberg (2010) wrote article titled, "Ford Drives Digital Dashboards to Next Level. Are drivers ready for this kind of technology?

  Identified users of the system

Who are the intended users and what was the main tasks that the users are expected to accomplish

  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.

  Find an article in the news regarding wireless hacking

Research via the internet and find an article in the news regarding wireless hacking, hardware hacking, or other security breach.As security and IT change so rapidly, your article should be no older than 2007 (i.e. Less than 5 years old).Summarize th..

  Write a scheme funtion that takes a list

Write a Scheme funtion that takes a list and an atom as parameters and returns a list identical to its parameter list except with all top level instances of the given atom deleted

  If you need a 3-input nand gate andhave

If you need a 3-input NAND gate andhave only 4-input NANDs, gates, what can you do?

  Modify the payroll program

Modify the Payroll Program so that it uses a class to store and retrieve the employee's name, the hourly rate, and the number of hours worked. Use a constructor to initialize the employee information

  Systems analyst modifying the sales order process

Suppose that you are a systems analyst on a project that involves modifying the sales order process. How many do you need to sample if you want 95 percent certainty that you have covered all variations?

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