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
In some video games, the player cannot obtain the reward without doing what with something that they already have?
Crank

Answer:

risking

Explanation:

8 0
3 years ago
you have a shop in Salem, Illinois, that sells specialty chocolates. Some customers from France have started placing orders. Whi
Vladimir79 [104]

The data regulation which you must adhere to for your sales to France is known as: D. the General Data Protection Regulation.

<h3>What is GDPR?</h3>

GDPR is an acronym for General Data Protection Regulation and it can be defined as a legal framework that was enforced on the 25th of May 2018, so as to sets guidelines for business firms during the collection, processing and use of personal information from individuals that are residing in the European Union (EU) and the European Economic Area such as:

  • Germany
  • France
  • England
  • Spain

This ultimately implies that, the General Data Protection Regulation is a data regulation which you must adhere to for your sales to France.

Read more on GDPR here: brainly.com/question/27416494

#SPJ1

4 0
2 years ago
When an employee is told that his job will be outsourced within a year, he knows that his job will become unnecessary
Anvisha [2.4K]
False!! Hope this helps
8 0
3 years ago
I need help right away pleas! 30 points.
Stolb23 [73]

Answer:

I'm very sorry if I'm wrong but I think it's A

8 0
2 years ago
Compression is the action of storing a piece of data with__________ bits.
soldi70 [24.7K]
The answer is fewer because I know a lot about tech I take classes
8 0
3 years ago
Read 2 more answers
Other questions:
  • Which of the following rules should be used to keep the appropriate distance between your vehicle and the vehicle in front of yo
    10·2 answers
  • A tower or mini tower pc is a type of all- in -one unit true or false
    9·2 answers
  • High-end tools in project management software have enterprise and _____ functions that summarize and combine individual project
    9·1 answer
  • Define an interface GUIComponent consisting of four method declaration: open: void-returning, accepts no parameters close: both
    9·1 answer
  • Select the correct answer.
    5·2 answers
  • Aubrey uses the following formula to calculate a required value. Which elements of the formula use mixed cell referencing?
    13·2 answers
  • The Circle and CircleTester have been created, but they have errors. The public and private settings for variables and methods a
    8·1 answer
  • Many large companies use the word(s), _____, to refer to the huge network of computers that meets their diverse computing needs.
    12·1 answer
  • At a family reunion, your cousin takes a picture of both of you with her phone, orders a print of it, and mails it to you with a
    5·1 answer
  • Which data type is the correct choice to store the names of all the hockey players who have scored 3 or more goals in a single g
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!