using the following pseudocode what C++ data types
should be used for the variable "finalAmount"
Final amount should be double data type
using the following pseudocode what C++ data types should be used for the variable "finalAmount" //...
What C++ data type should be returned from the function/method? // Start // Declarations // num amount // num newAmount // num interestRate // output "Please enter the dollar amount. " // input amount // output "Please enter the interest rate(e.g., nine percet should be entered as 9.0). " // input interestRate // newAmount = FutureValue(amount,interestRate) // output "The new dollar amount is ", newAmount // Stop // // // // num FutureValue(num initialAmount, num interestRate) // Declarations // num finalAmount // finalAmount = (1 + interestRate/100) * initialAmount // return finalAmount
Please help the out keeps printing twice #include #include #include #include #include using namespace std; /** * Function to calculate the future value and return the same */ double calculateFutureValue(double presentValue, double interestRate, int months) { double futureValue = (double)presentValue * pow((1 + interestRate), months); return futureValue; } /** * Function to read the input file and assign the value to the variables */ unsigned int readfile(ifstream &inF, double &presentValue, double &interestRate, int &months) { inF >>...
Find Bugs in the pseudocode// A high school is holding a recycling competition// This program allows a user to enter a student's // year in school (1 through 4)// and number of cans collected// Data is entered continuously until the user wnats to quit// After headings, output is four lines// one for each school year classstart Declarations num year num cans num SIZE = 4 num QUIT = 9 ...
Turning this Pseudocode into the described C++ Program? (will include Pseudocode AND Description of the Program below!) Pseudoode: start Declarations num deptNum num salary num hrsWorked num SIZE = 7 num totalGross[SIZE] = 0 string DEPTS[SIZE] = “Personnel”, “Marketing”, “Manufacturing”, “Computer Services”, “Sales”, “Accounting”, “Shipping” getReady() while not eof detailLoop() endwhile finishUp() stop getReady() output “Enter the department number, hourly salary, and number of hours worked” input deptNum, salary, hrsWorked return detailLoop() if deptNum >= 1 AND deptNum...
public static void main(String[] args) { System.out.println("Welcome to the Future Value Calculator\n"); Scanner sc = new Scanner(System.in); String choice = "y"; while (choice.equalsIgnoreCase("y")) { // get the input from the user System.out.println("DATA ENTRY"); double monthlyInvestment = getDoubleWithinRange(sc, "Enter monthly investment: ", 0, 1000); double interestRate = getDoubleWithinRange(sc, "Enter yearly interest rate: ", 0, 30); int years = getIntWithinRange(sc, "Enter number of years: ", 0, 100); System.out.println(); ...
using c++ Write a C++ program which reads three values of types char, int, double and string from the keyboard and primis, appropriately formatted, assigned values and variable types. For example, if letter, number, and real are variables of type char, int and double respectively, and if the values assigned to them using cin function are: a, 1, and 3.1415, then the output should be: a is a character 1 is an integen 3.1415 is a real number
Please put the following pseudocode into C++. Below the pseudocode is a header file as well as a cpp file that needs to be included. // Start // Declarations // Automobile myAuto // string vin // string make // string model // string color // output "Please enter the Vehicle Identification Number: " // input vin // output "Please enter the Make: " // input make // output "Please enter the Mode: " // input model // output "Please enter...
Debugging Section Exercise #1 50 points Plus up to 10 points extra The following pseudocode contains errors. You must find 3 or more errors in each of the following programs. If you find more than 3 mistakes, you will earn extra credit points. This pseudocode should determine the rental fees for cars Standard cars rent for $65 per day. compacts rent for $40 per day and subcompacts rent for $30 per day Rentals for at least 7 days receive a...
Part 1 – Data Encryption Data Encryption is the process of transforming data, using a cipher, to make it unreadable to anyone except those possessing special knowledge. In this problem you will implement a simple encryption technique on data that comprises of non-negative integers that have at least six digits with no leading zeroes. In order to encrypt the number the following functions are to be implemented: void input(int *num); int add4(int num); int shift(int num); void printOutput(int encryptNum, int...
The following files starts with some comments that describe the problem comments are lines that begin with two slashes(//). following the comments the file contains pseudocode that has one or more bugs you must find and correct Class Class 12. Debug (5 points) The following file starts with some comments that describe the prolblemcnpseudocode lines that begin with two slashes Un). Following the comments, the file that has one or more bugs you must find and correct. This Eile defines...