Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7064475
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T04:50:20+00:00 2026-05-28T04:50:20+00:00

I am making it so it adds, multiples, subtracts, and divides. I am running

  • 0

I am making it so it adds, multiples, subtracts, and divides. I am running it through my command prompt and I dont know how to make it so there is a space between each calculation. Or Even if I can get them on separate lines. But just a space would be fine.

#include <iostream> //io from console

int main() //app entry point 
{ 


  int num1;  //first variabe
  int num2; //second variable
  int sum; //sum of 2 variabes
  int product; //product of 2 variabes
  int difference; //differencr of 2 variabes
  int quotient; //quotient of 2 variabe

  std::cout << "Enter first number:  "; //prompt user for input
  std::cin >> num1; //assigns input to num1

  std::cout << "Enter second number  "; //prompt user for input
  std::cin >> num2; //assigns inout to num2

  sum = num1 + num2; //calcs the sum
  std::cout << "The sum is      "     <<  sum;   //displays the sum

  product = num1 * num2; //calcs the product
  std::cout << "  The product is     " <<     product;   //displays the product

  difference = num1 - num2; //calcs the product
  std::cout << "  The difference is     "   <<  difference;   //displays the        difference

  quotient = num1 / num2; //calcs the quotient
  std::cout << "  The quotient is   "    <<  quotient;   //displays the quotient

}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T04:50:21+00:00Added an answer on May 28, 2026 at 4:50 am

    Put this between each line or at the end of your lines or in the string you are printing.

    std::cout << "\n";

    Or add << endl; at the end of each output line.

    Added example for you below with the \n.


           #include <iostream> //io from console
    
           int main() //app entry point 
           { 
    
    
        int num1;  //first variabe
        int num2; //second variable
        int sum; //sum of 2 variabes
        int product; //product of 2 variabes
        int difference; //differencr of 2 variabes
        int quotient; //quotient of 2 variabe
    
        std::cout << "\nEnter first number:  "; //prompt user for input
        std::cin >> num1; //assigns input to num1
    
        std::cout << "\nEnter second number  "; //prompt user for input
        std::cin >> num2; //assigns inout to num2
    
        sum = num1 + num2; //calcs the sum
        std::cout << "\nThe sum is      "     <<  sum;   //displays the sum
    
        product = num1 * num2; //calcs the product
        std::cout << "\n  The product is     " <<     product;   //displays the product
    
        difference = num1 - num2; //calcs the product
        std::cout << "\n  The difference is     "   <<  difference;   //displays the        difference
    
        quotient = num1 / num2; //calcs the quotient
        std::cout << "\n  The quotient is   "    <<  quotient;   //displays the quotient
    
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

So I'm basically making an app that adds a count to a number and
I'm making a domino game and when the user adds a domino to the
Making UML sequence diagram in VS 2010RC I've observed that there is no activation
I've been making a jQuery plugin for password boxes. It adds a generate password
I am making an application with TabBar.In the Tab Bar there are 3 tabs.
I am making a program which dynamically adds objects, such as a button or
I'm currently learning Windows/DOS assembly. I'm just making a small program that adds two
I'm making a simple app where there are a series of either drop downs
I am making a small points game, which includes a Timer, which adds the
http://jsfiddle.net/JamesKyle/y7hBQ/ I'm making a simple jquery counting function that adds the following classes: First

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.