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
NARA [144]
3 years ago
14

Write a c++ function, largestnum, that takes as parameters a double array and its size and returns the index of the last occurre

nce of the largest element in the array. also, write a program to test your function.
Computers and Technology
1 answer:
miv72 [106K]3 years ago
6 0
Not a Question so how am i supposed to help with this problem
You might be interested in
Which design principle indicates the degree of darkness or lightness of a color in a design? _________is the degree of darkness
Svetlanka [38]
It's value, I believe so atleast.
8 0
4 years ago
If a user's input string matches a known text message abbreviation, output the unabbreviated form, else output: Unknown. Support
Molodets [167]

Answer:

Here is the JAVA program. I  have added a few more abbreviations apart from LOL and IDK.

import java.util.Scanner; // to take input from user

public class MessageAbbreviation {

public static void main(String[] args) { //start of main() function body

   Scanner input = new Scanner(System.in); // create object of Scanner

       String abbreviation= ""; //stores the text message abbreviation

/* In the following lines the abbreviation string type variables contain the un-abbreviated forms */

           String LOL = "laughing out loud";

           String IDK = "i don't know";

           String BFF = "best friends forever";

           String IMHO = "in my humble opinion";

           String TMI = "too much information";

           String TYT = "take your time";

           String IDC = "I don't care";

           String FYI = "for your information";

           String BTW = "by the way";

           String OMG = "oh my God";

//prompts the user to enter an abbreviation for example LOL

           System.out.println("Input an abbreviation:" + " ");

           if(input.hasNext()) { // reads the abbreviation form the user

           abbreviation= input.next(); }

// scans and reads the abbreviation from user in the abbreviation variable

/*switch statement checks the input abbreviation with the cases and prints the un abbreviated form in output accordingly. */

    switch(abbreviation) {

       case "LOL" : System.out.println(LOL);

                    break;

       case "IDK" : System.out.println(IDK);

                    break;

       case "BFF" : System.out.println(BFF);

                    break;

       case "IMHO": System.out.println(IMHO);

                     break;

       case "TMI": System.out.println(TMI);

                     break;

       case "TYT": System.out.println(TYT);

                     break;

       case "IDC": System.out.println(IDC);

                     break;

       case "FYI": System.out.println(FYI);

                     break;

       case "BTW": System.out.println(BTW);

                     break;

       case "OMG": System.out.println(OMG);

                     break;

                     

       default    : System.out.println("Unknown"); } } }

Explanation:

The program first prompts the user to enter an abbreviation. Lets say the user enters LOL. Now the switch statement has some cases which are the conditions that are checked against the input abbreviation. For example if the user enters LOL then the following statement is executed:

case "LOL" : System.out.println(LOL);

This means if the case is LOL then the message ( un abbreviated form) stored in the LOL variable is displayed on output screen So the output is laughing out loud.

Anything else entered other than the given abbreviations will display the message: Unknown

The output is attached as screen shot.

5 0
3 years ago
Read 2 more answers
in triangle abc the value of cot a by 2 into cot B by 2 minus 1 whole divided by cot a by 2 into cot B by 2 is equal to​
netineya [11]

Answer: 2 + 2 is 4 minus 1 thats 3 quick mafs

Explanation:

8 0
4 years ago
_______________involves engineers building up a 3D geometry piece by piece.
zloy xaker [14]

Answer:

<u>Parametric design</u> involves engineers building up a 3D geometry piece by piece. 2D sketches turn into 3D features, with constraints and relations duly applied to fit the designer's intent.

Explanation:

Hope this helps

8 0
3 years ago
A car has an odometer which at the start of a journey shows 99940 and at the end shows 00230.what is the result of subtracting 9
vampirchik [111]

Answer:

99,710

Explanation:

Thats what my calculator said

5 0
3 years ago
Other questions:
  • What are the two elements of creating a flyer
    12·2 answers
  • You find that you are missing a very important file. After much searching, you have determined that it is no longer on your comp
    13·2 answers
  • When working in excel online, which of the following is considered a conditional formula?
    8·2 answers
  • Why are application programs stored in main memory​
    11·1 answer
  • What is the output of the following program?
    10·1 answer
  • What are the most commonly found items in the trash according to the Municipal Solid Waste report?
    12·2 answers
  • What gaming PC should I get
    14·2 answers
  • Consider the security of a mobile device you use
    6·1 answer
  • Keyshia wants to add movement to her PowerPoint presentation. Which tab should she use to complete this task
    15·2 answers
  • Which approach is ideal for ensuring that a Webpage is maintained and does not appear neglected to users?
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!