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
Which is a monthly cost associated with renting a house?
Evgesh-ka [11]
The answer is a. utility bills
8 0
3 years ago
Read 2 more answers
Which fact does lean green eco machines present to show that electric cars are not perfect
Yuri [45]

Answer: HOPE THIS HELPED YOU! :D ;)

Eco cars are still too expensive for most car buyers

Explanation:

5 0
3 years ago
Read 2 more answers
Suppose that a program asks a user to enter multiple integers, either positive or negative, to do some calculation. The data ent
KatRina [158]

Answer:

d) An alphabetic character

7 0
3 years ago
In command prompt, Whats a command that will list only .ini files in C:\Windows\System32 directory?
Ber [7]

Answer:

The dir command is a Command Prompt command that's used to display a list of the files and subfolders contained in a folder.

hope it helps

3 0
4 years ago
Read 2 more answers
Indica las ventajas del sistema biela manivela.
leva [86]

Answer:

El atributo más importante de una manivela de rendimiento del mercado de accesorios es que a menudo tiene más trazo, por lo que puede crear un paquete de stroker y así agregar más pulgadas cúbicas en el motor. Otra ventaja es tener una versión que no está disponible de otra manera, como una manivela 360 (3,58 pulgadas de carrera) con una pequeña red (tamaño 318/340).

5 0
3 years ago
Other questions:
  • You are reluctant to write an extra credit book report because you are afraid that your language and punctuation skills are not
    11·1 answer
  • Bullets in a text box will do which of the following?
    9·1 answer
  • Which osi reference model layer includes all programs on a computer that interact with the network?
    13·1 answer
  • What is the seventh byte in the roller coasters file?
    12·1 answer
  • You've been hired as a consultant to help an online store owner. You need to complete the implementation of conversion tracking
    5·1 answer
  • In some cases, certain Hyper-V guest operating system features do not function properly using the operating system's own device
    9·1 answer
  • Given the following sets, for each set operation provide the elements of the resulting set in set notation or using a well-known
    5·1 answer
  • Is TCP really more secure than other L4 protocols by default?
    9·1 answer
  • Clara works behind a computer all day. She gets a lot of headaches, and her eyes have been hurting her lately. Her doctor diagno
    15·1 answer
  • TRUE/FALSE. a good with many close substitutes is likely to have relativelyelastic correct demand, since consumers can easily ch
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!