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
What is ‘Software Testing’?
SCORPION-xisa [38]

Answer: Software testing can be referred as an as activity that one execute in order to verify whether the results match expected results and also to make sure that software system is without any defect. It also tends to involve execution of few software component in order to evaluate several properties.  This majorly helps to identify gaps, error or requirements that are missing in respect to actual requirements.

5 0
3 years ago
Maria found a cupcake recipe on a cooking blog. However, she would like to read comments and suggestions before she begins bakin
Mnenie [13.5K]
Maria should use the Cooking blog that has known and verified information and step by step instructions Comments can lead to disaster and/or incorrect recipe use
8 0
4 years ago
Read 2 more answers
What is required to display content on transparencies?
VladimirAG [237]
An overhead projector is required to display content on transparencies. A transparency is a thin sheet of plastic in which light is reflected upon to display content.The light source emits light towards the transparency and then the image is displayed on the wall. Usually, this light source comes from below and lights upward and so the content is depicted above or overhead.
6 0
3 years ago
You are given an array x of string elements along with an int variable n that contains the number of elements in the array. You
jarptica [38.1K]

Answer and Explanation:

Make an algorithm of that which include array x of string where Mode of the value of the array means that you have the values such that 1.2,4,2,6,7,8,2 so 2 is the value of set as it appears more than other number similarly when a array of x has been given.First of all initialize a variable then declare it . so for initialization create a variable .Let suppose i create a variable of add and initialize it with 0 and given a it data type integer then

int add= 0;  // declaration

int add[]=0; // declaration and initialization in array

class add {  

void main(String array[]){  

int add[]=0;//declaration and instantiation  

int add[] = new int [3];

add[0]=30;//initialization  

add[1]=80;  

add[2]=20;  

output the given array of string

for ( int i = 0 ; i <add.length ;i++)

cout <<add[i];

 }

Taking an other example let initialization and declare array of string and print the greater value.For this create a variable with integer data type \

class Test{  

void main(String[] array){  

       //declaration of array

int test[][] = new int [2];

test[0]; new int [2];

test[1]; new int [4];

for initialization of array lets take variable a with data type integer

      int a=0;  

//taking loop for condition

       for (int i=0; i<test.length; i++)  

           for(int j=0; j<test[i].length; j++)  

//if the loops working properly then take increment in the variable a

               test[i][j] = a++;  

this process repeat until loops got false

   for (int i=0; i<test.length; i++)  

           for(int j=0; j<test[i].length; j++)  

         cout<<test[i][j]<<"+"<<"";  

           }  

           System.out.println();

       }  

   }  

6 0
4 years ago
Fill in the blank. THANK YOUU
Svetllana [295]

Answer:

She's procrastinating

Explanation:

3 0
3 years ago
Other questions:
  • Our company is only interested in purchasing a software upgrade if it leads to faster connectivity and data sharing. The old sof
    7·1 answer
  • If you like to interact with the game’s environment rather than with its inhabitants, which Bartle player type would you conform
    12·2 answers
  • HELP PLEASE
    7·2 answers
  • . What is the output of this code sequence?
    8·1 answer
  • Explain in your own words how you can use MSCONFIG and Task Manager to troubleshoot problems on the computer.
    15·1 answer
  • E-mail is an temporary message medium.<br> a. True<br> b. False
    5·2 answers
  • When an Item is base lined, it becomes frozen, here frozenmeans that only creating an old version can change the item
    9·1 answer
  • The length property of the String object returns
    15·1 answer
  • What are three ways to protect yourself from identity theft when using your smartphone or computer?.
    15·1 answer
  • Choose the answer that best completes the visual analogy.
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!