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
a_sh-v [17]
3 years ago
11

Given a String variable named line1 and given a Scanner reference variable stdin that has been assigned a reference to a Scanner

object, read the next line from stdin and save it in line1. (Do not concern yourself with any possible exceptions here-- assume they are handled elsewhere.)
Computers and Technology
1 answer:
Anna35 [415]3 years ago
4 0

Answer:

Scanner stdlin = new Scanner(System.in);

line1 = stdlin.readline();

Explanation:

1.stdlin is the referenced input variable made by using built in Scanner class of Java language.

2.Than in line1 the next line from the console will be assigned by using readline function.

You might be interested in
PYTHON --- Toll roads have different fees based on the time of day and on weekends. Write a function calc_toll() that has three
Oduvanchick [21]

The toll program illustrates the use of conditional statements;

As a general rule, conditional statements are used to make decisions

<h3>The toll program</h3>

The toll program written in Python where conditional statements are used to make several decisions is as follows:

def calc_toll(hour, morning, weekend):

   toll_fee = 0

   if weekend == False:

       if morning == True:

           if hour < 7:

               toll_fee+=1.15

           elif hour < 10:

               toll_fee+=2.95

           elif hour <= 12:

               toll_fee+=1.90

       else:

           if hour < 3:

               toll_fee+=1.90

           elif hour < 8:

               toll_fee+=3.95

           elif hour >= 8:

               toll_fee+=1.40

   else:

       if morning == True:

           if hour < 7:

               toll_fee+=1.05

           elif hour <= 12:

               toll_fee+=2.15

       else:

           if hour < 8:

               toll_fee+=2.15

           elif hour >= 8:

               toll_fee+=1.10

   return toll_fee

   

Read more about conditional statements at:

brainly.com/question/24833629

#SPJ1

3 0
2 years ago
Using the 4 Cs, we consider where a company may decide to offer the product or service to customers. Whether online or in a phys
DanielleElmas [232]

Answer:

"Place" in the 4P's.

Explanation:

The 4C's marketing model was formulated in the year 1990 by Robert Lauterborn. The 4C's comprises of; Customer value, Cost, Convenience, and Communication. It is important to know that this marketing model is an improvement of the 4P's model.

Convenience implies that any product being marketed has to be made easily accessible to the customers. The location should also make it possible, that the product is easily seen by the customers.

Place was a concept in the 4P's model that sought to resolve the problem of where the product can be best distributed. The introduction of Convenience in the 4C's improved on it, and extended it to imply that there must be a high level of accessibility of the product.

3 0
2 years ago
A burglar alarm company's advertisements show images of women's homes being broken into. What stereotype is promoted by these ad
Lady_Fox [76]
C. that women are vulnerable
5 0
2 years ago
Read 2 more answers
write a program to evaluate the following postfix expression. the value of each variable must be asked from the user during the
ikadub [295]

In this exercise we have to use the knowledge of computational language in C++ to write a code that program to evaluate the following postfix expression. the value of each variable must be asked from the user during the execution time.

<h3>Writting the code:</h3>

<em>#include <bits/stdc++.h></em>

<em>using namespace std;</em>

<em>// CREATED A </em><em>CLASS </em><em>STACK</em>

<em>class Stack</em>

<em>{</em>

<em>public:</em>

<em> int top;</em>

<em> unsigned sz;</em>

<em> int* ar;</em>

<em>};</em>

<em>// VARIOUS STACK </em><em>FUNCTIONS</em>

<em>Stack* makeStack( unsigned sz )</em>

<em>{</em>

<em> Stack* stack = new Stack();</em>

<em> // BASE </em><em>CONDITION</em>

<em> if (!stack) return NULL;</em>

<em> stack->top = -1;</em>

<em> stack->sz = sz;</em>

<em> stack->ar = new int[(stack->sz * sizeof(int))];</em>

<em> if (!stack->ar) return NULL;</em>

<em> // RETURNING THE STACK</em>

<em> return stack;</em>

<em>}</em>

<em>// CHECKING IF THE STACK IS </em><em>EMPTY</em>

<em>int isEmpty(Stack* stack)</em>

<em>{</em>

<em> return stack->top == -1 ;</em>

<em>}</em>

<em>// CHECKING THE TOP OF THE STACK</em>

<em>int whatAtTop(Stack* stack)</em>

<em>{</em>

<em> return stack->ar[stack->top];</em>

<em>}</em>

<em>// </em><em>POPPING </em><em>OUT OF A STACK</em>

<em>int pop(Stack* stack)</em>

<em>{</em>

<em> if (!isEmpty(stack))</em>

<em>  return stack->ar[stack->top--] ;</em>

<em> return '$';</em>

<em>}</em>

<em>// PUSHING IN THE STACK</em>

<em>void push(Stack* stack, int op)</em>

<em>{</em>

<em> stack->ar[++stack->top] = op;</em>

<em>}</em>

<em>// EVALUATING </em><em>POSTFIX </em><em>STARTS HERE</em>

<em>int postfixEvaluator(string res)</em>

<em>{</em>

<em> // CREATING STACK</em>

<em> Stack* stack = makeStack(res.length());</em>

<em> int i;</em>

<em> // BASE </em><em>CONDITION</em>

<em> if (!stack) return -1;</em>

<em> for (i = 0; res[i]; ++i)</em>

<em> {</em>

<em>  // CHECK FOR SPACES</em>

<em>  if (res[i] == ' ')continue;</em>

<em>  // CHECK FOR THE DIGIT</em>

<em>  else if (isdigit(res[i]))</em>

<em>  {</em>

<em>   int N = 0;</em>

<em>   // EXTRACT THE </em><em>NUMBER </em><em>OUT OF STACK</em>

<em>   while (isdigit(res[i]))</em>

<em>   {</em>

<em>    N = N * 10 + (int)(res[i] - '0');</em>

<em>    i++;</em>

<em>   }</em>

<em>   i--;</em>

<em>   // </em><em>PUSH </em><em>THE NUMBER IN STACK</em>

<em>   push(stack, N);</em>

<em>  }</em>

<em>  // POPPING AND </em><em>ARITHMETIC </em><em>OPERATIONS</em>

<em>  else</em>

<em>  {</em>

<em>   int pos1 = pop(stack);</em>

<em>   int pos2 = pop(stack);</em>

<em>   switch (res[i])</em>

<em>   {</em>

<em>   case '+': push(stack, pos2 + pos1); break;</em>

<em>   case '-': push(stack, pos2 - pos1); break;</em>

<em>   case '*': push(stack, pos2 * pos1); break;</em>

<em>   case '/': push(stack, pos2 / pos1); break;</em>

<em>   }</em>

<em>  }</em>

<em> }</em>

<em> return pop(stack);</em>

<em>}</em>

<em>// MAIN CODE</em>

<em>int main()</em>

<em>{</em>

<em> string tes;</em>

<em> getline(cin, tes);</em>

<em> string tmp = "";</em>

<em> string res = "";</em>

<em> for (int i = 0; i < tes.length(); i++) {</em>

<em>  if (tes[i] <= 'z' and tes[i] >= 'a') {</em>

<em>   tmp += tes[i];</em>

<em>  } else if (tes[i] == ' ' and (tes[i - 1] <= 'z' and tes[i - 1] >= 'a')) {</em>

<em>   cout << "Enter the value of " << tmp << ": ";</em>

<em>   int x; cin >> x;</em>

<em>   res += (to_string(x));</em>

<em>   res += ' ';</em>

<em>   tmp = "";</em>

<em>  } else {</em>

<em>   res += tes[i];</em>

<em>  }</em>

<em> }</em>

<em> cout << "\nThe postfix expression is : " << res;</em>

<em> cout << "\nThe result is : " << postfixEvaluator(res);</em>

<em> return 0;</em>

<em>}</em>

See more about C++ at brainly.com/question/19705654

#SPJ1

8 0
11 months ago
Click this link to view O*NET’s Work Activities section for Manicurists and Pedicurists. Note that common activities are listed
devlian [24]

Answer:

c and e

Explanation:

4 0
2 years ago
Other questions:
  • So for my Game Design class I have a quiz coming up...I was wondering if someone could answer some of these practice questions,
    7·2 answers
  • By default, the windows desktop display
    12·1 answer
  • A posting error is:
    8·1 answer
  • What are the disadvantages of using pointers?
    6·1 answer
  • Your source data is of 50 GB. You make a full backup. Next week, once again you perform a full backup, but this time 10 more GB
    10·1 answer
  • How is the phrase "employability skills" defined?
    11·2 answers
  • Help me!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!​
    9·1 answer
  • Where is the flash drive listed in a windows 7 save as dialog box?
    9·1 answer
  • Which of the follow is an example of an integer?<br> "1.091"<br> "number"<br> 15<br> name
    10·1 answer
  • A successful entrepreneur is
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!