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
irakobra [83]
3 years ago
9

Write a program that uses an "if" statement to determine if the number is greater than one. If the number is greater than 1, the

program calculates the square and cube of the number and displays the output to the user.
Computers and Technology
1 answer:
Vsevolod [243]3 years ago
7 0

Answer:

if(i>1)

{

Console.WriteLine(i*i);

Console.WriteLine(i*i*i);

}

Explanation:

This is written in C#, and it's probably not as clean as it could be. I'm not sure what language you wanted it in, so I just picked the one I'm most familiar with.

You might be interested in
A company ABC asked you to design a simple payroll program that calculates and employee's weekly gross pay, including any overti
julsineya [31]

Answer:

<em>C++.</em>

#include <iostream>

using namespace std;

////////////////////////////////////////////////////////////////

int main() {

   int weekly_hours = 0;

   int hourly_rate;

   float gross_pay = 0;

   cout<<"Enter weekly hours worked: ";

   cin>>weekly_hours;

   

   cout<<"Enter hourly rate: ";

   cin>>hourly_rate;

   

   cout<<endl;

   ////////////////////////////////////////////////

   if (weekly_hours > 40) {

       gross_pay = (weekly_hours*hourly_rate) + ((weekly_hours*hourly_rate)*0.5);

   }

   else

       gross_pay = weekly_hours*hourly_rate;

       

   cout<<"Weekly gross pay: $"<<gross_pay;

   ////////////////////////////////////////////////

   return 0;

}

3 0
3 years ago
Do all light bulbs server a practical purpose?
Greeley [361]

Answer:

A light bulb produces light from electricity

6 0
3 years ago
How is primary storage different from secondary storage? Select the TWO correct statements.
Zina [86]
Primary storage refers to the main storage of the computer or main memory which is the random access memory or RAM. Secondary storage, on the other hand, refers to the external storage devices used to store data on a long-term basis.
7 0
3 years ago
How many binary digits are in 10^100.
Basile [38]

Answer:

333 binary digits.

Explanation:

8 0
2 years ago
How many pounds must a sand bag weigh to test if a safety net can absorb the proper amount of force? A. 150 lbs. B. 200 lbs. C.
Ymorist [56]
C. is your answer have a nice day
7 0
3 years ago
Read 2 more answers
Other questions:
  • Write a function named shareALetter that takes one parameter, wordList – a list of words. Create and return a dictionary in whic
    13·1 answer
  • A popular use of cd-rw and cd-r discs is to create audio cds. what is the process of copying audio and/or video data from a purc
    11·1 answer
  • Explain how to identify a starting position on a line.
    15·2 answers
  • What does media saturation mean?
    15·1 answer
  • Select two netiquette guidelines. In a paragraph of no less than 125 words, explain why these guidelines make professional onlin
    9·1 answer
  • Which command displays the status of the ipsec installation?
    7·1 answer
  • Why is there no ide length or timing for study breaks?​
    12·1 answer
  • Need answer ASAP. No links
    13·1 answer
  • Preliminaries
    13·1 answer
  • Upload your completed project including the following:
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!