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
Spreadsheet software creates a ____, composed of a grid of columns and rows
andriy [413]
Spreadsheet software creates a worksheet, composed of a grid of columns and rows.
3 0
3 years ago
How does net neutrality affect consumers actovate in a a positive way?
Lerok [7]

Answer:

Net neutrality prevents ISP's from treating internet communications differently. In that your ISP cant discriminate or charge differently based on user, content,website,platform,address or method of communication.

3 0
4 years ago
Match these step-by-step directions in the order that you will find them in this course.
7nadin3 [17]

Answer:

1.Go to the View tab and select Watch.

2.Comparison

3.Editing

4.Drawing (I think)

5.Predesigned slides available for creating a new presentation

Explanation:

6 0
3 years ago
I need subscribers plz ​
melamori03 [73]

Answer:

No :) here this is my channel name jshdhebejdb

8 0
3 years ago
Read 2 more answers
How many nibbles make one kilobyte​
Kazeer [188]
2000 nibbles I think correct me if I’m wrong
5 0
3 years ago
Read 2 more answers
Other questions:
  • Find a, b, and c<br> A a=4 square root of 6 b= 8 square root of 2 ; c= 4 square root of 2
    12·1 answer
  • Nonvolatile in the context of data storage means ________________. a. the data can't be changed in a data warehouse. b. the data
    11·1 answer
  • ​this is another name for the wireless configuration in which a central wireless device is used to serve all wireless clients.
    13·1 answer
  • What occurs when you call a method on a reference variable that contains null? Select one: a. An ArrayIndexOutOfBoundsException
    11·1 answer
  • A virus or worm can have a payload that installs a(n) __________ door or trap-door component in a system, which allows the attac
    14·2 answers
  • When a partition is formatted with a file system and assigned a drive letter it is called a volume?
    10·1 answer
  • Problem 5. (Greatest Common Divisor) Write a program gcd.py that accepts p (int) and q (int) as command-line arguments, and writ
    13·1 answer
  • Which one way in which using infrared in game console controllers could affect the experience of a person playing the game?
    8·1 answer
  • 75 pts. Conduct online research about 10 of the most famous and dangerous computer viruses that threatened computer networks aro
    13·1 answer
  • Impromptu speaking ability is very important in the workplace to clearly and effectively communicate ideas. An effective impromp
    8·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!