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
If the ____________ is broken on a laptop, chances are other parts are also broken.
lana66690 [7]

Answer:keyboard

Explanation:

5 0
3 years ago
What is the purpose of a budget
Iteru [2.4K]
To one say money, and two to have pocket money. If you are on a budget which is when you can spend X amount of money. Then you would be able to pay bills and not go over your budget or you  will not have money for Bills and car notes and insurance, stuff like that.

3 0
3 years ago
Pick the correct statements regarding cell references.
shusha [124]

Statement two and three is correct.

Statement 1 is incorrect. A relative reference changes when a formula is copied to another cell while Absolute references remain constant. However, it is safe to say that an absolute address can be preceded by a $ sign before both the row and the column values. It is designated by the addition of a dollar sign either before the column reference, the row reference, or both. Statement C is also correct. A mixed reference is a combination of relative and absolute reference and the formula (= A1 + $B$2) is an example of a mixed cell reference.

7 0
4 years ago
Read 2 more answers
Write a program 10 enter 3 number and find smallest.​
timama [110]

10 + 3 = 13

13 - 10 = 3

5 0
2 years ago
How do I convince my mom to buy a gaming computer for me? She says we already have 3 other computers/laptops in the house to use
Natalka [10]

Answer: ??

Explanation: explain to her that you don't have your own. keep asking and convince her you're doing good in school, (if u are) and that you listen and you should be responsible to have your own

4 0
3 years ago
Other questions:
  • Type the correct answer in the box. Spell all words correctly.
    9·1 answer
  • Which command is used to add conditions to the basic query?
    15·1 answer
  • _____ is a technique that combines the strongest features of Wired Equivalent Privacy (WEP) and Extensible Authentication Protoc
    11·1 answer
  • One of the implications of price elasticity of technology products is that:
    11·1 answer
  • It is advised to always have discretion with leaders. Explain in general terms what information security policies can and cannot
    12·1 answer
  • Knowing and understanding the targeted audience is a main compnent to creating a website
    15·1 answer
  • What is Moodle in information communication and Technology?​
    5·1 answer
  • Type the correct answer in the box. Spell all words correctly.
    7·2 answers
  • The key uniquely identifies each record
    9·1 answer
  • Select the correct answer from each drop-down menu. The following diagram shows four resistors. What is the effective resistance
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!