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
What is not true of credit scores?
Nadya [2.5K]
The more money you make, the higher your credit score.credit is a numerical value to measure your favor-ability in borrowing activities.This numerical value is mostly influenced by how good you are in handling your financial responsibilities, whether you're paying debt on time or you're making loans often. So the amount of money you earn has nothing to do in this valuation.

Hope this helps:))

5 0
3 years ago
Write a c++ program to calculate the approximate value of pi using this series. The program takes an input n that determines the
Tanya [424]

Answer:

#include <iostream>

#include <iomanip>

using namespace std;

int main() {

  char choice;

  cout << setprecision(12) << endl;

  while(true) {

      int sign = 1;

      double pi = 0;

      cout << "Enter number of terms: ";

      long n;

      cin >> n;

      for(long i = 1; i < n; i += 2) {

          pi += sign/(double)i;

          sign = -sign;

      }

      pi *= 4;

      cout << "value of pi for n = " << n << " is " << pi << endl;

      cout << "Do you want to try again(y or n)? ";

      cin >> choice;

      if(choice == 'n' || choice == 'N') {

          break;

      }

  }

  return 0;

}

Explanation:

6 0
3 years ago
An email message containing a warning related to a non-existent computer security threat, asking a user to delete system files f
LenKa [72]

Answer: Virus Hoax

Explanation:

A computer virus hoax is a message that warns someone of a false virus threat. It is a a chain email that encourages who ever has received the message to pass it to other people as a form of warning.

5 0
3 years ago
I need help for my computer science class I would appreciate it
kirill115 [55]

Answer:

21

Explanation:

a = 7

b = 7

c = 2

7 is greater than or equal to 7 , so it will return 7 + 7 *2 which is 21

5 0
2 years ago
Which business case is better solved by Artificial intelligence than conventional programming?<br>​
skad [1K]

Answer:

Predicting characteristics of high-value customers is the business case that better solved by Artificial intelligence than conventional programming.

Explanation:

Many corporations and businesses predict CLVs only by resembling at the total monetary expense of sales, without recognition circumstances. For instance, a customer who executes one big order might be less worthwhile than another consumer who purchases multiple occasions, but in more diminutive amounts.

4 0
3 years ago
Other questions:
  • Use a one-dimensional array to solve the following problem: A company pays its salespeople on a commission basis. The salespeopl
    6·1 answer
  • 50 pts DO NOT ANSWER FOR POINTS
    9·1 answer
  • A program that interacts with another piece of software as it if were a human user is known as a(n) ________.
    5·1 answer
  • What natural resource are available on the coast but not somewhereelse
    13·1 answer
  • Hi! I'm Kayla! I was wondering who does homework on the weekends... anybody?? I guess almost everyone, including me. Anyways, le
    13·2 answers
  • What does the binary odometer show about representing large numbers?
    8·1 answer
  • A _________________ operating system accepts random enquires from remote locations and provides an instantaneous response
    5·1 answer
  • Given the following array definition, write a constant declaration named ArraySize that automatically calculates the size in byt
    5·1 answer
  • ---------------------- use of the Internet to access programs and data on computers that are not owned and managed by the user o
    9·1 answer
  • tell us things u did as a kid but don't want to admit to it (best gets brainly 5 stasr and a thank you)
    13·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!