1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Sliva [168]
3 years ago
6

Write a program that requires the user to enter two floating-point numbers (num1 and num2) from the keyboard. Multiply them and

display the original two numbers and the calculated floating-point product. When displaying the floating-point numbers, limit your output display to 3 digits after the decimal point (for example, display 23.567810 as 23.568).
Computers and Technology
1 answer:
kogti [31]3 years ago
5 0

Answer:

#include <iostream>

#include <iomanip>

using namespace std;

int main()

{

   float num1,num2,product;

   cout<<"Input first number: ";

   cin>>num1;

   cout<<"Input second number: ";

   cin>>num2;

   product = num1*num2;

   int digits = 3;

  cout << " (rounded to " << digits << " digits after the decimal point )"<< fixed << setprecision(digits) << num1 << "*" << num2 <<  " = " << product << "\n";

   

   return 0;

}

Explanation:

iostream is a standard library file that contains code that allows a C++ program to display output on the screen and read input from the keyboard.

iomanip is a standard library used for formatting your output.

using namespace std means that you are going to use classes or functions  from "std" namespace,

int main() is used as the entry point of the program, it contains your code and the  main() is the function from where the program will start to execute.

float num1,num2,product;

you have to first declare the variables and assign them to a data type float.

   cout<<"Input first number: ";

   cin>>num1;

   cout<<"Input second number: ";

   cin>>num2;

prompt and collect inputs for num1 and num2

product = num1*num2;

calculate the product of num1 and num2

int digits = 3;

the number of digits you want after the decimal point

cout << " (rounded to " << digits << " digits after the decimal point )"<< fixed << setprecision(digits) << num1 << "*" << num2 <<  " = " << product << "\n";

fixed ensures that the precision that you have set will remain constant through out the code.

setprecision(digits)  this allows you to set the precision

You might be interested in
A device which lets you interact with the computer
Gnoma [55]

Answer:

Input, output, storage.

Explanation:

Input is used to interact with, or send data to the computer (mouse, keyboards, etc.). Output provides output to the user from the computer (monitors, printers, etc.). And storage which stores data processed by the computer (hard drives, flash drives, etc.).

3 0
3 years ago
Read 2 more answers
Which is true about POP3 and IMAP for incoming email?
IceJOKER [234]
<h2>Answer:</h2>

Option A: Both POP3 and IMAP  keep email on an email server by default.

is the correct answer.

<h2>Explanation:</h2>

Following points will make the idea of POP3 and IMAP clear:

<h3>POP3:</h3>
  • POP3  is the acronym for Post Office Protocol 3.
  • POP3 is the method of receiving emails in which the emails received on the app can be downloaded on to the computer by having an internet connection.
  • These downloaded emails can be viewed offline whenever needed and managed as well.
  • POP3 makes it possible that the storage space of the default server do not run short as the downloaded emails are deleted from the server.
<h3>IMAP:</h3>
  • IMAP stands for Internet Message Access Protocol.
  • It is the method in which the mails are viewed and managed directly on the internet server instead of downloading them on the computer.
  • IMAP makes sure to manage the mails so carefully and timely so that unimportant mails are deleted to make sure that the storage space does not run short.
<h3>Conclusion:</h3>

So from these points we can make sure that both ways keep emails on email server but POP3 have option to download mails from server while IMAP dont have.

<h2>I hope it will help you!</h2>
8 0
3 years ago
100 Base-T: Group of answer choices
Allisa [31]

Answer:

can run at either full- or half-duplex

Explanation:

In Computer Networking, 100Base-T also known as fast ethernet is an ethernet standard that operates at 100Mbps and can run at either full- or half-duplex.

It uses Shielded Twisted Pair (STP) cabling system.

The Variations of 100BaseT are;

- 100BaseTX

- 100BaseFX.

8 0
3 years ago
Question 6 options: This is a category or partitioned group of the small units of a programming language include its numeric lit
Wittaler [7]

Lexeme is a category or partitioned group of the small units of a programming language include its numeric literals, operators, and special words.

<h3>What is a lexeme in programming?</h3>

Lexemes are known to be those character strings that are put together from the character group of a program, and the token stands for what aspect of the program's grammar they are made of.

Hence, Lexeme is a category or partitioned group of the small units of a programming language include its numeric literals, operators, and special words.

Learn more about Lexeme from

brainly.com/question/14125370

#SPJ1

6 0
2 years ago
What help the ict in your life?and write own idea three or four sentence
My name is Ann [436]

Answer:

I am a software engineering student

computers have createed an impact in my life because through computers i work, I do research and many more

7 0
2 years ago
Other questions:
  • What is a custom information field that helps users to find a specific document?
    8·1 answer
  • What is the purpose of a primary key?
    5·1 answer
  • A simulation system is a technology that enables you to take over a customer’s screen, mouse, or other connected device in order
    13·1 answer
  • Draw a dfd that shows how data will be stored, processed, and transformed in the tims system
    9·1 answer
  • Define the terms of data and information .​
    6·1 answer
  • Which company provides a crowdsourcing platform for corporate research and development?
    9·1 answer
  • This is for C++: Using a nested for loop output the following pattern to the screen:
    12·1 answer
  • A _____ is the viewing area for a web page, which is much smaller on a phone than on a traditional desktop.
    7·1 answer
  • All HTML5 webpages must begin with the HTML element _____.
    6·1 answer
  • your manager asked you to set up a secure network connection at a remote site to move over some back ups. what protocol what do
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!