Calculate the power of a number entered by the user

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

Assignment

1) Write a C++ program 6 that allows user to input numbers separated by a new line character and outputs the summation of all the numbers. Users may input any amount of numbers until they input 0, that is, the program should keep taking input from the user until user input 0.
Sample input 22
53
67
-4
0
Output 138

2) Write a C++ that for a given integer n print i * on the ith line for i = 1,2,3,...,n. For example, when an user inputs number 5, the program should output
*
**
***
****
*****
If an user inputs number 4, the program should output
*
**
***
****

3) Write a program to ask the user to enter n.Print the sum of following series until n. 1+1/2+1/3+1/4-------1/n

4) Write a program to ask the user to enter a character. If the character appears in your suburb name then print the message that the character appears in your suburb name else print message that the character does not appear in your suburb address.Hint: Suburb will be fixed by the programmer.
Sample Input: Kurralta Park User Input : t

t appears in your suburb name c
c doesn't appear in your suburb name

5) Write a program to ask the user to enter their customer number and their meter reading for electricity bill generation. Based on the table below calculate the monthly electricity Bill. Make sure you include the supply charge per cycle in the final Bill generated.

South Australia Electricity Pricing

Below prices are effective as of July 1 2019.

Standing Tarrif

Residential Electricity Rates

Unit

Energy standing Tarrifs

General Usage Rates

 

Incl GST

First 32877 kWh/day

c/kWh/day

40.18(c/kWh/day)

Next 76712 kWh/day

c/kWh/day

40.28(c/kWh/day)

Next 164384 kWh/day

c/kWh/day

40.38(c/kWh/day)

Next 273973 kWh/day

c/kWh/day

40.48(c/kWh/day)

Balance

c/kWh/day

40.58(c/kWh/day)

Supply charge dollars/cycle

Dollar per cycle

$30

6) Write a program to calculate the power of a number entered by the user until the user enters ‘N' or 0 (Its your choice to terminate program either by entering N or 0.)
Sample Input: Enter the base:
Enter the exponent 3 Sample Output = 8

Do you want to calculate again ?

Reference no: EM132401441

Questions Cloud

Confidence interval for the average number of latex : Form a 95% confidence interval for the average number of latex gloves used per week by all health care workers with a latex allergy.
Find the proportion of blue gumballs : Each gumball machine holds exactly 850 gumballs. Find the proportion of blue gumballs in the 5% of machines with the most blue gumballs.
Compute the value of the test statistic z : A test is made of H0: =µ 20 versus H1: ? µ 20. A sample of size n = 55 is drawn, and x = 18. The population standard deviation is s = 8
Infant mortality rate between 5 and 7? percent : What percentage of states have an infant mortality rate between 5 and 7? percent? Round your answer to two decimal places.
Calculate the power of a number entered by the user : Write a program to ask the user to enter a character. If the character appears in your suburb name then print the message that the character appears
PARA704 Clinical Risk Management- Assignment Problem : PARA704 Clinical Risk Management Assignment Help and Solutions, Auckland University of Technology, New Zealand-Analyse a known risk that relates to clinical.
What is the probability that four or more of them used : A study conducted by a company reported that 58% of cell phone owners used their phones inside a store for guidance on purchasing decisions.
Explain how you got the bounds for the integral : Find P(Y
Random sampling from a dichotomous population : Use the normal approximation (without the continuity correction) to calculate Pr(A) for a sample size of 400.

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Create program that uses functions and reference parameters

Create program that uses functions and reference parameters, and asks user for the outside temperature.

  Write a program using vectors and iterators

Write a program using vectors and iterators that allows a user to maintain a personal list of DVD titles

  Write the code required to analyse and display the data

Calculate and store the average for each row and column. Determine and store the values for the Average Map.

  Write a webservices application

Write a webservices application that does a simple four function calculator

  Iimplement a client-server of the game

Iimplement a client-server version of the rock-paper-scissors-lizard-Spock game.

  Model-view-controller

Explain Model-View-Controller paradigm

  Design a nested program

How many levels of nesting are there in this design?

  Convert celsius temperatures to fahrenheit temperatures

Write a C++ program that converts Celsius Temperatures to Fahrenheit Temperatures.

  Evaluate and output the value in the given base

Write C program that will input two values from the user that are a Value and a Base with which you will evaluate and output the Value in the given Base.

  Design a base class shape with virtual functions

Design a base class shape with virtual functions

  Implementation of classes

Implementation of classes Chart and BarChart. Class barChart chould display a simple textual representation of the data

  Technical paper: memory management

Technical Paper: Memory Management, The intent of this paper is to provide you with an in depth knowledge of how memory is used in executing, your programs and its critical support for applications.

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