Write a program that calculate square and cube of the number

Assignment Help C/C++ Programming
Reference no: EM132283591

Question: You will write a flowchart, and C code for a program that does the following:

1. Asks a user for a number

2. Uses an "if" statement to determine if the number is greater than one. If the number is not greater than one, you must write out an error message.

3. If the number is greater than 1, the program calculates the square and cube of the number, and displays the output to the user.

Reference no: EM132283591

Questions Cloud

Implementing a knowledge management system : What was the organization's prime motivation for implementing a knowledge management system
Advantages of the multiple layer of implementation : What is the function of Logging on these devices or systems? How can you take full advantages of the multiple layer of implementation?
Which of the movie compression formats : Which of the movie compression formats (Avi, Mp4, MKV,...) can provide better quality? Why do you believe so?
Functions of and relationships among laws : Describe the functions of and relationships among laws, regulations, and professional organizations in information security.
Write a program that calculate square and cube of the number : Uses an "if" statement to determine if the number is greater than one. If the number is not greater than one, you must write out an error message.
How computers can make life journey abit more difficult : We all had the unfortunate experience of seeing how computers can, at times, make life's journey abit more difficult. This is especially true in knowledge.
How might you incorporate your previous learning : Consider some examples of successful global business. Complete either an interview with a manager doing business internationally.
What new threats do computer systems and networks pose : What new threats do computer systems and networks pose to personal privacy? Conversely, what threats are enabled or enhanced by computer systems and networks?
Compare and contrast each sector of the framework : Choose two service companies with which you are familiar, such as Facebook, Amazon, and UPS. Apply Hill's Strategy Development Framework to them.

Reviews

Write a Review

C/C++ Programming Questions & Answers

  A program that will search a file of numbers of type int

Write a program that will search a file of numbers of type int and write the largest and the smallest numbers to the screen.

  Write the definitions of the functions

Write the definition of the function setZero that initializes any one-dimensional array of type int to 0.

  Change this code to read in strings from a text file

code takes in a string from a user, checks if the paranthesis are ballanced (as defined by my class) and also returns the variable from my line (also from my class). All like to change this code to read in strings from a text file (each line is a str..

  Write a program that prompt the user to enter the two points

Write a program that prompts the user to enter the two points, and then displays the distance between them. You may assume the values entered are valid.

  A password must have at least eight characters

A password must have at least eight characters. A password must consist of only letters and digits. A password should contain at least one uppercase letter. A password must contain at least two digits.

  Write a program that will read in 4 test scores

Write a program that will read in a list of numbers and double each number. Your program should work for any number of lines of data.

  Prompts the user to enter an integer

Write the code that prompts the user to enter an integer between 1 and 20 (including 1 and 20), reads the value using cin, and then prints the value that they entered in a statement that begins with "You entered a ". Save this version in a separate l..

  C programme to find the minimum and maximum value

write a c programme to find the minimum and maximum value each elements in each row ,to create table b,having 5 rows and 2 coloums,the first coloum of table b is the maximumvalue and thye second coloum is the maximum value in each row.

  Determines the access privillege of a derived class

The base class access specifier determines the access privillege of a derived class to its base class

  Add a non member function

For the code below add the following. Add a non member function that will run the show function of a Sport object. This object is the one parameter of the function.

  What is the size of int in a 64 bit compiler

Can you explain the question in detail - What is the size of int in a 64 bit compiler?

  Program to produce ten random permutations of numbers

In C++(must be able to compile in Visual Studio ): Write a program to produce ten random permutations of numbers 1 to 10.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd