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

  Complete the 8 queens 2 dimensional array

Complete the 8 queens 2 dimensional array program with backtracking. please change the below program using backtracking  and please run before posting it . the program suppose to print 92 solution . amd also comment before each line to better unde..

  Student average and the class average

The program should accept student data until the word “DONE” is entered for the student name. This data should be printed to the screen in tabular format see below). The data also should be stored in a file. One student data should be stored per line..

  Calculate the slope or beta

Calculate the slope or beta where the following facts exist: In Year 1 a share of IBM stock increased 8%, and in Year 2 it increased 10%

  Compute the power loss in a transmission line

A program to compute the power loss in a transmission line with a resistance of 0.05 ohms/mile. Compare the power loss if 500 kw of power is transmitted from a power generating station to cities at distances of 20, 30, 40, 50... 100 miles at 100 V..

  Write a c program that asks for and reads in two integers

Write a C program that asks for and reads in two integers and then reports if one is a multiple of the other.

  Q1 write a program that generates the following

q1. write a program that generates the following outputnbspnbspnbspnbspnbspnbspnbspnbsp 10nbspnbspnbspnbspnbspnbspnbsp

  Select the total number of shippers for orders

Select the total number of Shippers for Orders (Hint: use COUNT(ShipVia) as TotalProducts to return non-null counts.

  Modify this pop() function, so that it uses recursion.

Rewrite the following power() function so that it uses recursion. Provide a function main to test the implementation.

  Hypothetical method lock over an object lock

Imagine a hypothetical version of Java where the object lock is replaced by a method lock. Under this system a call to a synchronised method would assign a lock for that method to the calling thread.

  Execute the next line which is enter your last name

C++ in VS and I'm trying to run the following program. As soon as I put in my name after the 2nd cout statement, the program ends.

  Program that allows the user to enter two numeric values

Prepare a program that allows the user to enter two numeric values. Then let the user enter a single character as the desired operation, for example 'A', 'a', or '+' for add.

  Create a class called card player and deck

Write a class called "Card" with the following traits: it holds two private variables, a suit and a value (ace is high). It has public functions that randomly generate and modify the suit, value and print out the suit/value to the screen. Write a ..

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