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
Bezzdna [24]
3 years ago
14

a user's given name followed by the user's age from standard input. Then use an ofstream object named outdata (which you must de

clare) to write this information separated by a space into a file called outdata. Assume that this is the extent of the output that this program will do. Declare any variables that you need.
Computers and Technology
1 answer:
RUDIKE [14]3 years ago
4 0

Answer:

See explaination for program code

Explanation:

#include <iostream>

#include <string>

#include <fstream>

using namespace std;

int main() {

string name;

int age;

cout << "Enter name of user: ";

getline(cin, name);

cout << "Enter age of user: ";

cin >> age;

ofstream outdata("outdata");

outdata << name << " " << age << endl;

outdata.close();

return 0;

}

You might be interested in
Tricking someone else into sharing private information, then posting it publicly online, is a form of which type of cyberbullyin
Alisiya [41]
If the bully did not first befriend the person, it’s outing. If he did, then it’s trickery.
5 0
3 years ago
Suporting details gives you?
Korvikt [17]

The answer is option B "more information about the subject." Supporting details are used to support your argument in your essay, so you have more faces, and information in order to make a strong argument. Supporting details do indeed make your paragraph bigger but that's not the reason why they are used. Supporting details help you prove your claim and defend your argument against people who think the opposite way of your claim.

Hope this helps!

6 0
3 years ago
Find the maximum value and minimum value in milesTracker. Assign the maximum value to maxMiles, and the minimum value to minMile
Ann [662]

Answer:

See Explanation

Explanation:

Your program is correct and doesn't need an attachment.

However, there's a mismatch in placement of curly braces in your program

{

}

I've made corrections to that and I've added the corrected program as an attachment.

Aside that, there's no other thing to be corrected in your program.

Use another compiler to compile your program is you are not getting the required output.

Download java
7 0
3 years ago
Which popular Linux distribution is based on building all packages from source codes?
Nataly [62]
Linux 1.12 is the correct answer
3 0
4 years ago
Can you imagine a world in which drones do everything for us? A drone is a UAV, but do you know what it stands for?
azamat
I do not know wat UAV stands for sorry :(
8 0
3 years ago
Other questions:
  • Propane also known as LP gas, is often mixed with about _______ percent of other gases, such as butane, propylene, and mercaptan
    13·1 answer
  • According to the 2010/2011 Computer Crime and Security Survey, ____ is "the most commonly seen attack, with 67.1 percent of resp
    10·1 answer
  • Which sentence is an example of constructive statement
    14·1 answer
  • Which feature of a website takes you to a different part of the website or a totally different website when you click on it?
    12·2 answers
  • All of the following are potential benefits of blogging except
    10·1 answer
  • _____ is the measure of a system’s ability to expand, change, or downsize easily to meet the changing needs of a business enterp
    11·1 answer
  • *When a computer programmer is finished writing or developing a program, what has to happen first before the computer can unders
    8·1 answer
  • Which of the following bit value represent -5 in two's complement notation?
    5·1 answer
  • Reesa works for a large real estate company. She is responsible for installing and supporting the company's internet systems, in
    5·1 answer
  • Raw materials have two basic types what are the 2?
    11·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!