answer.
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
erastovalidia [21]
2 years ago
10

Write code that uses the input string stream inss to read input data from string userinput, and updates variables usermonth, use

rdate, and useryear. sample output if userinput is "jan 12 1992":
Computers and Technology
2 answers:
Savatey [412]2 years ago
4 0

Answer:

The solution code is written in C++

  1.    string usermonth;
  2.    int userdate,useryear;
  3.    
  4.    string userinput = "jan 12 1992";
  5.    istringstream inss;
  6.    inss.str(userinput);
  7.    
  8.    inss>> usermonth>>userdate>>useryear;
  9.    
  10.    cout<<usermonth<<" "<<userdate<<" "<<useryear;

Explanation:

Firstly, declare three variables, <em>usermonth, userdate and useryear </em>(Line 1-2).

Next declare another variable <em>userinput</em> to hold the input string (Line 4). Create an input string object,<em> inss</em> (Line 5) that can read the input string (Line 6). Once the input string is read into inss, we can use >> operator to update variable <em>usermonth, userdate, </em>and <em>useryear</em> (Line 8).

We print the value of <em>usermonth, userdate, </em>and <em>useryear</em> at console terminal (Line 10) and we shall get:

jan 12 1992

mr Goodwill [35]2 years ago
3 0

Answer:

It will be a java code.

Explanation:

import java.util.Scanner;

public class StringInputStream {

    public static void main (String [] args) {

        Scanner inSS = null;

        String userInput = "Jan 12 1992";

        inSS = new Scanner(userInput);`

        String userMonth = "";

        int userDate = 0;

        int userYear = 0;

        /* Your solution goes here  */

        System.out.println("Month: " + userMonth);

        System.out.println("Date: " + userDate);

        System.out.println("Year: " + userYear);

        return;

   }

}

You might be interested in
C# Write, compile, and test a program named PersonalInfo that displays a person’s name, birthdate, work phone number, and cell p
Soloha48 [4]

Answer:

#include <stdio.h>

#Include<iostream>

using namespace std;

//Define required function

PersonalInfo( )   {

    printf("Name   : Robert Josh\n");  

    printf("DOB    : July 14, 1975\n");  

    printf("Work Phone : 00-00000000\n");  

    printf("Cell Phone : 11-777777777\n");  

    return(0);  

 }

int main()   {

    //Call function

 PersonalInfo( );

 return 0;

 }

Explanation:

Its just a simple code to print required details when the function PersonalInfo is called.

5 0
2 years ago
Which one of the following is a correct declaration for a method named passAList that has as arguments an array list myList of s
alekssr [168]

Answer:

"public static void passAList(ArrayList<Integer> myList, int[] intArr)", is the correct answer for the above question.

Explanation:

Missing information :

  • The option is missing but the question states "choose from the following". The correct defining syntax is defined above.

Detailed Explantion :

  • The above question asked about syntax which takes the value of list and array as an argument.
  • It is already defined in the above syntax.
  • And the value is passed by the user at the time of function call.
  • The array list is defined by the help of the ArrayList class and the array is defined by the help of the "[]" symbol.

3 0
2 years ago
Write code that uses the input string stream inss to read input data from string userinput, and updates variables usermonth, use
mr Goodwill [35]

Answer:

It will be a java code.

Explanation:

import java.util.Scanner;

public class StringInputStream {

    public static void main (String [] args) {

        Scanner inSS = null;

        String userInput = "Jan 12 1992";

        inSS = new Scanner(userInput);`

        String userMonth = "";

        int userDate = 0;

        int userYear = 0;

        /* Your solution goes here  */

        System.out.println("Month: " + userMonth);

        System.out.println("Date: " + userDate);

        System.out.println("Year: " + userYear);

        return;

   }

}

3 0
2 years ago
Read 2 more answers
What technique creates different hashes for the same password? ccna routing protocols final answers?
elena-s [515]
The answer is Salted Password Hashing.  The process is similar to hashing., but with a twist. A random value is introduced for each user. This salt value<span> is included with the password when the hash value is calculated and is stored with the user record. Including the salt value means that two users with the same password will have different password hashes.</span>
7 0
2 years ago
Write a loop that displays all possible combinations of two letters where the letters are 'a', or 'b', or 'c', or 'd', or 'e'. T
Dafna11 [192]

Answer:

for (char outerChar='a'; outerChar<='e'; outerChar++){

for (char innerChar='a'; innerChar<='e'; innerChar++){

cout << outerChar << innerChar << "\n";

}

}

3 0
1 year ago
Other questions:
  • U.S. industries like steel, computers, and energy need to be protected from foreign competition to ensure which of the following
    6·2 answers
  • When you examine a computer chip under a microscope, what will you see?
    6·1 answer
  • What are the pros and cons of using unique closing reserved words on compound statements?
    15·1 answer
  • Annabeth has been using a public cloud to store and access her documents. Which drawback of a public cloud should she be aware o
    11·1 answer
  • Which key retains its uniqueness even after you remove some of the fields?
    14·1 answer
  • How can a signature be added to an email message? Check all that apply.
    10·2 answers
  • A company moves a popular website to a new web host. Which of the following will change as a result?
    15·1 answer
  • Write a statement that assigns total_coins with the sum of nickel_count and dime_count. Sample output for 100 nickels and 200 di
    11·1 answer
  • Select the correct navigational path to freeze the top row of your worksheet. Select the panes you wish to freeze. Click the tab
    15·2 answers
  • A(n) ___________________ is a set of characters that the originator of the data uses to encrypt the text and the recipient of th
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!