1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
fiasKO [112]
3 years ago
8

Find all three-digit numbers with non-zero first digit that are equal to the sum of the cubes of their digits.

Computers and Technology
1 answer:
Strike441 [17]3 years ago
3 0

Answer:

Here is code in C++.

//include header

#include <bits/stdc++.h>

using namespace std;

// main function

int main() {

// check for all three digit numbers

for(int x=100;x<=999;x++){              

          int num = x;

          // find 1st,2nd and 3rd digit

          int d1 = x%10;                    

          int d2 = (x/10)%10;            

          int d3 = x/100;

          // calculate sum of cube of all three digits

          int sum=pow(d1, 3)+pow(d2, 3)+pow(d3,3);

          // if sum is equal to number then print it

         if(sum == num){

              cout<<num<<endl;

          }

}

return 0;

}

Explanation:

Check all the three digit numbers, if the sum of cubes of digits is equal to the number or not.First extract all three digit and then calculate their cubes. Then sum all those three value And then check if the sum is equal to the number or not.If the sum is equal to number then print the number.

Output:

153

370

371

407

You might be interested in
An agile team used planning poker to estimate user stories. After all team members read a user story, the facilitator asks every
Natali [406]

Answer:

The answer is "Option B"

Explanation:

In the given-choices, the only option B is correct because by reassessing instantly, the team loses is its advantage of debating its projections and how it chose those assessments, and the wrong choice can be defined as follows:

  • In choice A, Mostly as a unit for the projections, respondents should not use the ideal days.  
  • In choice C, Whenever the procedure should've been anonymous, no cards were released.
  • In choice D, Its mediator was incorrect and the laws were followed.
4 0
3 years ago
Define time management and give two activities that you can do to help manage your tasks, homework, or projects better.
lions [1.4K]
Time management: <span>the ability to use one's time effectively or productively, especially at work also activities you can do would be organizing and making sure you get that essay done in under 30 mins </span>
5 0
3 years ago
What is the first thing Kernel does when WinLoad turns over the starttup process to it
SashulF [63]

It activates HAL, reads more information from the registry, and builds into memory the registry key

4 0
3 years ago
A tornado may be approaching if you observe which of the following?
musickatia [10]
I would go with a funnel cloud on this one. It is the most common sign although it does not guarantee a tornado. Most tornadoes that reach the ground do expand from funnel clouds, but a condensation funnel cloud formation is not absolutely necessary for a tornado to form.
5 0
3 years ago
It is a single strand of metal capable of transmitting power or data from one area to<br> another
Lera25 [3.4K]

Answer: A wire

Explanation:

8 0
3 years ago
Other questions:
  • Kash has created a document that needs to be protected. only certain users should be able to open the document. what option shou
    5·1 answer
  • Budget at completion<br><br> What does this measurement tell you?
    8·1 answer
  • Most software packages have functions for generating _____ about columns of data, which include statistical summaries like contr
    7·1 answer
  • WILL MARK BRAINIEST
    12·1 answer
  • A celebrity blogger you have followed for years advises readers to try a new beauty product. Before purchasing the product, a sa
    10·1 answer
  • Pls answer will give brainlest dont answer if you dont know
    8·1 answer
  • Explain how mobile phone production could be more sustainable​
    8·2 answers
  • To break a text string into several lines, which means that the text string continues on the next line, the _____ character shou
    8·1 answer
  • 4.1 code practice python
    13·1 answer
  • WRITE A PROGRAM TO CALCULATE SIMPLE INTEREST
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!