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
Pomógłbymi ktoś z takim zadaniem? C++
Elenna [48]

#include <iostream>

using namespace std;

int main(int argc, char** argv) {

 

int n;

cout<<"Podaj n: ";

cin>>n;

 

int **tab=new int *[n];

 

for(int i=0;i<n;i++){

 tab[i]=new int [n];

}

 

for (int l=0;l<n;l++){

 for(int j=0;j<n;j++){

  if(j==l || n-l-1==j) tab[l][j]=0;

  else tab[l][j]=1;

 }

}

 

 for (int i=0;i<n;i++){

 for(int j=0;j<n;j++){

 cout<<tab[i][j];

 }

 cout<<"\n";

}

 

for(int i=0;i<n;i++){

  delete [] tab[i];

}

delete [] tab;

return 0;

}

Siema Marcin tak wgl.

8 0
3 years ago
Gap junctions and plasmodesmata have what feature in common?
rusak2 [61]

Answer:

Both allow transport of materials between cells.

Explanation:

Gap junctions are found in animals, they are used as a channel between cells to transport ions, water, and other substances. Gap junctions are developed in vertebrates when a set of six membrane protein called connexins form an elongated, donut-like structure called connexons.

Plasmodesmata. is found in plants, they are special spots or holes in a plant cell wall, that allows cytoplasmic exchange between cells.

6 0
3 years ago
Please what do you guys think about this ?
Y_Kistochka [10]

Answer:itsjust black

Explanation:

Black thoughts

3 0
3 years ago
Read 2 more answers
How can parents be health educators in family​
Fudgin [204]

Answer:

They can be health educators in family because they are your parents.

Explanation:

The reason why is because since they are your parents that means they have kids, so they probably know the ins and outs of parenting and running a family.

7 0
3 years ago
Which is the last step in conducting a URL search?
m_a_m_a [10]
It all depends what you are looking for...
3 0
3 years ago
Read 2 more answers
Other questions:
  • When a dynamic array with a class for a base type is declared, which constructor is called?
    5·1 answer
  • While in slide show mode, if you are not careful you can close the application by clicking the x on the menu bar. question 38 op
    12·2 answers
  • Which of these jobs would be most appropriate for someone who majors in computer engineering? ANSWER FAST PLEASE
    15·2 answers
  • Is badlion safe and how ?
    14·1 answer
  • Advanced Electronics has employees who use a company website to share work. By posting on the website, employees are
    7·1 answer
  • The NVCC college professor receives frequent emails disguised as official business emails. They may be requests to reset a passw
    10·2 answers
  • A Consider the following method definition. The method printAllCharacters is intended to print out every character in str, start
    11·1 answer
  • State True or False: 1. Application software can run without the presence of system software. 2. . A language processor translat
    14·1 answer
  • To indent an entire paragraph or list you should:
    9·1 answer
  • reagan's firm has not had to make large investments in computer or networking hardware or in personnel to maintain the hardware
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!