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
Describe three ways to protect the computer and all peripheral devices from damage
omeli [17]

Here are three ways:

Cleaning: as applied to most things in our lives, cleaning also applies to protecting peripheral devices. To ensure the smooth running of such devices one needs to clean the dust and dirt from these devices once in a while. Make sure you disconnect the device before you eject it from the system.<span>

Follow instructions: Most devices come with a safety guide and instructions manual, always use the recommended settings for the smooth running of your system. These recommendations usually come from the manufacturer and are reliable.

<span>Surge suppressor/protector: One of the major issues faced by the users is faults caused by power surges. One needs to make sure to use a Surge Suppressor/Protector connected with the system to make sure it will not damaged with power fluctuations. </span></span>

3 0
4 years ago
In a PC, which of the following components stores the BIOS
LiRa [457]
I think it’s rom because rom chip is on the PC mother chip
5 0
3 years ago
Please tell fast plzzzzzz.​
Vaselesa [24]

Answer:

false well if u know someone u can click it

6 0
3 years ago
Write a Java method to delete a record from a B-tree of order n.
max2010maxim [7]

Answer:

Deleting a record on a B-tree consists of three main events:

- Searching the node where the key to be deleted exists

- Deleting the key

- Balancing the tree if required

Explanation:

q = NULL;

   p = tree;

   while (p) {

       i = nodesearch(p, key);

       q = p;

       if (i < used(p) -1 && key == k(p,i)) {

           found = TRUE;

           position = i;

           break;

       }

       p = son(p,i);

   }

   if (!found)

   else if (subtree(p)) {

         if (used(p) > ((n-1)/2)+1)

         delkey (p, position, key);

       else {

           replace (p, position, fsucc(p));

           p0 r1 p1 r2 p2 r3 ……. pn-1 rn-1 pn

           q = &fsucc(p);

           qpos = index of fsucc;

           if (used(rbrother(p)) > ((n-1)/2)+1)

               replace (q, qpos, sonsucc(q));

           else

               while (q && used(q) < (n-1)/2) {

                   concatenate(q, brother(q));

                   q = father(q);

               }

       }

   }

   else

   delkey(p, position, key);

}

6 0
3 years ago
CONDUCT INTERVIEWS
iragen [17]

Answer:

you have to interview people around you with the questions that you put that you my have then record your interviews into that box.

Explanation:

...

6 0
3 years ago
Other questions:
  • .Write an if-else statement for the following:
    12·2 answers
  • FILL IN THE BLANK.
    15·1 answer
  • What types of input and output devices would be ideal for a college student completing his or her coursework?
    8·1 answer
  • Which is an example of a tertiary source?
    13·1 answer
  • Create a method remove Evens that removes all even elements from an ArrayList of
    7·1 answer
  • Software refers to the physical parts of a computer.<br> a. True<br> b. False
    11·2 answers
  • Please help me on this please i am giving all of my points so please help me
    6·1 answer
  • . Write the advantages and disadvantages of CLI?
    14·2 answers
  • What symbol does access use to the left of a record when it is currently being edited and is therefore locked so that other user
    12·1 answer
  • When viewing an e-book section of an assignment in launchpad, you can return to your main course page at any time by clicking th
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!