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
Naddik [55]
3 years ago
14

Demonstrate how to write each condition as an if-else in Java. If yes, then the computer should print “The answer is A,” “The an

swer is B,” or “The answer is C.” Otherwise, the computer should print “The answer is not here.”
Condition: variable choice is A, B, or C.


(You must actually give a answer to the question. If your answer is A B or C then im removing your answer and flagging it.
Computers and Technology
1 answer:
konstantin123 [22]3 years ago
4 0

\tt x=(float(input("Enter\;your\:answer")))

\tt if\:x=A:

\qquad\tt print("The\:answer\:is\:A")

\tt elif\::

\tt x=B;

\qquad\tt print("The\:answer\:is\:B")

\tt x=C;

\qquad\tt print("The\:answer\:is\:C")

\tt else\::

\qquad\tt print("The\:answer\:is\:not\:here")

You might be interested in
Djdjdjdjdjdjdjdjdjjdjdjdjdjdjdjdjdjdjdj
DanielleElmas [232]
Shorty a bad bleep .
7 0
3 years ago
Read 2 more answers
It is the application of knowledge
Fynjy0 [20]

Answer:

yes............

Explanation:

...........

5 0
3 years ago
On a scale of 1-10 how would you rate your pain
aleksandrvk [35]

Explanation:

There are many different kinds of pain scales, but a common one is a numerical scale from 0 to 10. Here, 0 means you have no pain; one to three means mild pain; four to seven is considered moderate pain; eight and above is severe pain.

4 0
3 years ago
A main document in a mail merge contains data, such as names and addresses.
My name is Ann [436]

Yes, it contains names and addresses


Explanation:

Mail Merge includes bulk letters, names, addresses, emails and envelops etc.

Mail merge primarily enables automating the process of sending bulk mail to customers, subscribers or general individuals. Mail merge works when a data file is stored that includes the information of the recipients to whom the letter is to be sent. This file can be a spreadsheet or database file containing separate fields for each different type of information to be merged within the letter.


3 0
3 years ago
Write a c program that reprints input so that no line is longer than 50 characters. Specifically, for lines less than or equal t
Alex73 [517]

Using the knowledge in computational language in C++ it is possible to write a code that reprints prints input so that no line is longer than 50 characters.

<h3>Writting the code:</h3>

<em>#include<stdio.h></em>

<em />

<em>int main(int argc, char** argv){</em>

<em>    //creating pointer to read a file</em>

<em>    FILE * fp;</em>

<em>    char * line = NULL;</em>

<em>    size_t len = 0;</em>

<em>    ssize_t read;</em>

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

<em>    //opening a file</em>

<em>    fp = fopen(argv[1], "r");</em>

<em>    //handling the error condition</em>

<em>    if (fp == NULL){</em>

<em>        printf("File not found..!!");</em>

<em>        return 0;</em>

<em>    }</em>

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

<em>    //reading a file line by line</em>

<em>    while ((read = getline(&line, &len, fp)) != -1) {</em>

<em>        i = 0;</em>

<em>        if(read >= 50){</em>

<em>            moreThan50++;</em>

<em>        }</em>

<em>        while(i < read){</em>

<em>            if(line[i]!='\n'){</em>

<em>                if(i%50 == 0){</em>

<em>                    printf("\n%c",line[i]);</em>

<em>                }else{</em>

<em>                    printf("%c",line[i]);</em>

<em>                }</em>

<em>            }</em>

<em>            i++;</em>

<em>        }</em>

<em>    }</em>

<em>    printf("\nTotal lines over 50 chars: %d\n",moreThan50);</em>

<em>    printf("Offending Lines: ");</em>

<em>    for(i=1;i<=moreThan50;i++)</em>

<em>        printf("%d, ",i);</em>

<em>    fclose(fp);</em>

<em>    return 0;</em>

<em>}</em>

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

#SPJ1

4 0
2 years ago
Other questions:
  • An organization needs to maintain data files of its employees in the form of tables. They also need to access and update over th
    15·2 answers
  • Which of these automotive repair areas helps the vehicle change speeds to operate efficiently under all conditions?
    5·1 answer
  • If you have cable internet service, what protocol is used between the head end connection and the cable company's network
    8·1 answer
  • A customer states that when she removes the printed pages from her laser printer output tray, the black ink smears all over her
    14·1 answer
  • 1. Suppose a process in Host C has a UDP socket with port number 6789. Sup- pose both Host A and Host B each send a UDP segment
    5·1 answer
  • What type of filtering software divides email messages that have been received into two piles, spam and non-spam and then analyz
    13·1 answer
  • The methodology used by web project teams is usually:
    9·1 answer
  • Rick is teaching a photographic worship about sun color and image. He shows the students a few images to teach them about contra
    12·1 answer
  • Can someone please do this java lab for me (100 point version)? Im really having trouble. (DO NOT GIVE FAKE, USELESS ANSWERS. I
    14·1 answer
  • Can someone please help me with this ,it is my assignment of technology and agriculture year 8
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!