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
7nadin3 [17]
3 years ago
11

Special numeric has three digits and holds a property that it is exactly equal to summation of cubes from each digit. For exampl

e, 370 is an element named special numeric. 370 = 3 3 + 7 3 + 0 3 . Write a C program to explore these special integer numbers from 100 to 999 and display all of them on screen. You can use for loop. Name your program f
Computers and Technology
1 answer:
Vera_Pavlovna [14]3 years ago
8 0

Answer:

The following code is written in C programming language:

#include <stdio.h>     //header file

 

int main()       //main method

{

   int n, t, digit1, digit2, digit3;      // set integer variables

    // print message

   printf("Print all Special integer numbers between 100 and 999:\n");

   n = 100;      //initialize value in variable "n"    

   while (n <= 999)      //set while loop

   {

       digit1 = n - ((n / 10) * 10);

       digit2 = (n / 10) - ((n / 100) * 10);

       digit3 = (n / 100) - ((n / 1000) * 10);

       t = (digit1 * digit1 * digit1) + (digit2 * digit2 * digit2) + (digit3 * digit3 * digit3);

       if (t == n)      //set if statement

       {

           printf("\n Special integer number is: %d", t);     //print an output

       }

       n++;

   }

}

Output:

Print all Special integer numbers between 100 and 999:

Special integer number is: 153

Special integer number is: 370

Special integer number is: 371

Special integer number is: 407

Explanation:

Here, we set the header file "stdio.h".

Then, we define integer type "main()" function.

Then, we set five integer type variable "n", "t", "digit1", "digit2", "digit3".

Then, we the print message by print() method and initialize a value to variable "n" to 100.

Then, we set the while loop which starts from 100 and stops at 999 and if the condition is true than code inside the loop is execute either loop is terminated.

Then, we set the if statement and pass the condition, if the condition is true the output would be print either if the condition is false the if statement is terminated.

You might be interested in
Gloria is in her sophomore year of college and works part time. She has assignments saved on her home computer, her aunt's lapto
Tanzania [10]
I think this answer, "<span>Upload all existing documents to a cloud-based program," is correct. Hope I helped!!</span>
4 0
3 years ago
Read 2 more answers
Assume that a single page of printed text requires 52 lines of text, and that each line of text averaged 80 characters. If each
zysi [14]

Answer:

4160000 bytes

Explanation:

One page = 52 lines of text

One line of text = 80 characters

=> One page = 80 x 52 = 4160 characters

Therefore, 500 pages of text will have 4160 x 500 characters = 2080000 characters.

Since 1 character takes up 2 bytes of computer memory, it impleies that a 500 page novel will take up 2080000 x 2 bytes = 4160000 bytes.

5 0
3 years ago
What was the original name of the Dream SMP?
Naddik [55]

Answer:

Dream Team SMP

Explanation:

7 0
1 year ago
Read 2 more answers
¿El auto es un servicio tecnológico? / The car is a technological service?
EleoNora [17]
A car isn’t technological, It runs on gas. Hopes this helps :p
4 0
3 years ago
Which of these purchases is most likely to be paid for with a credit card
Vesna [10]

Answer:

plane ticket?

Explanation:

7 0
3 years ago
Other questions:
  • Steve is proofreading his memo and he notices that he has typed a phrase twice. Steve should _____.
    5·2 answers
  • You are reviewing the style sheet code written by a colleague and notice several rules that are enclosed between the /* and */ c
    12·1 answer
  • What parts of the computer does it not need to function?​
    9·1 answer
  • Discuss anomaly detection.
    5·1 answer
  • A list is a collection that ______________
    9·1 answer
  • In order to create a chart, which of the following must be selected?
    8·1 answer
  • Write a program that can add, Subtract, multiply and divide entered numbers. <br>​
    11·1 answer
  • Is permanent software programmed into read-only memory.<br> Firmware<br> JavaScript<br> PHP<br> o
    7·1 answer
  • Where are all my smart ppl at? Help me out!!!
    14·2 answers
  • Which would you use to get the number of elements in a dictionary?
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!