How would you put a empty space between output

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

How would you put a empty space between output, right now it prints 6 rows but how do i add a space or a "\n" for example

row1

row2

row3

blank space

row22

row 23

row24

for (i=1; i<=months; i++)
{
if (i<=3 || i>=(months-2))
{
accInt = (loanAmount) * (monRate); // accured interest
principal = monPayment - accInt; // the new princiapal
lastBalance = loanAmount - monPayment + accInt; //the last balance from the loan amount
sumInterest += accInt;
if (i==months)
lastBalance = 0; // if its the last month it has to equal zero
// output of all the loan information
myOut << fixed << setprecision(0) << i <<"\t""$"<< fixed<<setprecision(2)<<accInt<<"\t""$"<<fixed<<setprecision(2)<<principal<<"\t""$"<<fixed<<setprecision(2)<<lastBalance<<"\n";
loanAmount = lastBalance; //updats new loan amount
}

}
myOut <<"\n" <<"Total interest paid: $" <<fixed<<setprecision(2)<<sumInterest;

Reference no: EM13168436

Questions Cloud

How long should it take you to reach new york : You pass a road sign saying "New York 115 km." If you drive at a constant speed of 65 mi/h, how long should it take you to reach New York? (Round to the nearest minute.)
An analysis of a group of weight measurements : An analysis of a group of weight measurements involves converting a weight value into an integer category number that is determined as follows
What is the theoretical and percent yields of ethanol : what is the theoretical and percent yields of ethanol if 648 grams of sucrose undergoes fermentation and 349 grams of ethanol is obtained.
The saffir-simpson hurricane wind scale classifies : The Saffir-Simpson hurricane wind scale classifies hurricanes into five categories based on the intensity of their sustained winds. A category one hurricane has wind speeds between 74 and 95 miles per hour (mph)
How would you put a empty space between output : How would you put a empty space between output, right now it prints 6 rows but how do i add a space or a "\n" for example row1 row2 row3
What is the pressure in the tank at a constant temperature : A 80.0-L stainless steel container was charged with 4.00 atm of hydrogen gas and 5.00 atm of oxygen gas. A spark ignited the mixture, producing water. What is the pressure in the tank at a constant temperature of 25°C?
Construct the student class student.h : Construct the Student Class Student.h and Student.cpp student class should include a Student.h header file for your class definitions and a Student.cpp implementation file comprised of first name, last name, ram id
Short memo to the vice-president of production : Write a short memo to the vice-president of production recommending whether the availability of any of the three resources (blending, purification, or labor) should be increased from current levels. If you recommend an increase, specify at most ho..
What are the solute particles present in aqueous solutions : Methanol, CH3OH, is a nonelectrolyte; acetic acid, HC2H3O2, is a weak electrolyte; and ammonium chloride, NH4Cl, is a strong electrolyte. What are the solute particles present in aqueous solutions of each compound? (Select all that apply.)

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Ohio phonebook has gotten mixed up

In an accident, the Ohio phonebook has gotten mixed up. The names are now really out of order. You and your enthusiastic, but naive, assistant Carl must fix the problem. No one can use the phonebook while you are sorting it, so every extra second of ..

  Calculates the sum of the cube roots of two integers.

Wrtie a program that calculates the sum of the cube roots of two integers. The program should use the following functions as well as a main funcion. 1) enter one positive value 2) compute the cube root of one integer 3) report the value of two intege..

  Image text transcribed for accessibility

Image text transcribed for accessibility: write a program that requires the number of bits for the exponent and significant of a floating point representation, then requires two decimal real numbers and an operation,sum,subtraction or multiplic..

  Write a program that skip s leading whitespace character

a) Write a program that skip s leading whitespace character s in each line of the pro vided data file CPPHumor .txt . Save the results in a new file

  How nested if-statements replace with one if-statement

Describe how following nested If-statements could be replaced with one if-statement using logical operator (And/Or/Not). Write down the C++ code example.

  Change the inheritance to private inheritance

Take the following C++ code and make the following changes. Change the inheritance to private inheritance. Change the private data member balance to protected. Define get function members of IntAccount class to retrieve name and balance.

  Draws a single level for a "rogue­like" computer game

You will write a program that draws a single level for a "Rogue­like" computer game. The program will parse a line of input text from an input file (room.txt), use the parsed text to determine the shape of the room and its contents and then draw the ..

  Program that takes a number between

Write a program that takes a number between -121 and 121 and output that number in the format of power of 3 (1,3,9,27)example:13 = 9+3+1

  Distinguish syntax and purpose of while-loop and for-loop

Distinguish the syntax and purpose of while-loop and syntax of a for-loop. Give C++ code examples of both loops and descriibe the main differences.

  Design and implement a library system

Design and implement a library system that does the following: ? Takes details of a student/library users: first name, last name, other names, user ID number, and nationality.

  You are to create a program

You are to create a program that will input a group of floating point values, storing them as double values in an array. This array will then be sent to three functions.

  Write a loan calculator program

Write a loan calculator program in C++ that displays monthly balances for user-specified loan terms. To be flexible, you decide to specify the loan terms in a file and provide that filename  entered from the keyboard. To keep things simple

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