Given four values representing counts of quarters, dimes, nickels and pennies, output the total amount as dollars and cents. Output each floating-point value with two digits after the decimal point, which can be achieved as follows: System.out.printf("Amount: $%.2f\n", dollars); Ex: If the input is: 4 3 2 1 where 4 is the number of quarters, 3 is the number of dimes, 2 is the number of nickels, and 1 is the number of pennies, the output is: Amount: $1.41 For simplicity, assume input is non-negative.
LAB ACTIVITY 2.32.1: LAB: Convert to dollars 0/10 LabProgram.java Load default template. 1 import java.util.Scanner; 2 3 public class LabProgram 4 public static void main(String[] args) { 5 Scanner scnr = new Scanner(System.in); 6 7 /* Type your code here. */|| 8 9) Develop mode Submit mode Run your program as often as you'd like, before submitting for grading. Below, type any needed input values in the first box, then click Run program and observe the program's output in the second box Enter program input (optional) If your code requires input values, provide them here. Run program Input (from above) 1 LabProgram.java (Your program) Output (shown below) Program output displayed here

Answers

Answer 1

Answer:

Replace /* Type your code here. */ with the following lines of code

int quarter =scnr.nextInt();

int dime = scnr.nextInt();

int nickel = scnr.nextInt();

int penny = scnr.nextInt();

double dollars = quarter * 0.25 + dime * 0.1 + nickel * 0.05 + penny * 0.01;

System.out.printf("Amount: $%.2f\n", dollars);

System.out.print((dollars * 100)+" cents");

Explanation:

The next four lines declare the given currencies as integer

int quarter =scnr.nextInt();

int dime = scnr.nextInt();

int nickel = scnr.nextInt();

int penny = scnr.nextInt();

This line calculates the amount in dollars

double dollars = quarter * 0.25 + dime * 0.1 + nickel * 0.05 + penny * 0.01;

The next two lines print the amount in dollars and cents respectively

System.out.printf("Amount: $%.2f\n", dollars);

System.out.print((dollars * 100)+" cents");

Answer 2

Given four values representing counts of quarters, dimes, nickels and pennies, the total amount in dollars and cent can be represented as follows;

#1 quarters = 0.25 dollars

#1 dime  = 0.1 dollar.

#1 nickel = 0.05 dollars

#1 penny = 0.01 dollars

#quarters, dimes, nickels and pennies,

x = input("write your input here: ")

for i in x:

  quarters = 0.25*float(x[0])

  dime = 0.1*float(x[1])

  nickel = 0.05*float(x[2])

  penny = 0.01*float(x[3])

sum1 = quarters + dime + nickel + penny

print(round(sum1, 2))

Code explanation:

The commented section of the code is just the conversion rate of quarters, dime, nickel and penny to dollars.

Variable x is used to store the user's input.Then, we loop through the users inputThen multiply each looped value by it conversion rate to dollars.Finally, we sum the values and print the sum rounded to 2 decimal places as required.

learn more on python code here: https://brainly.com/question/24556911?referrer=searchResults

Given Four Values Representing Counts Of Quarters, Dimes, Nickels And Pennies, Output The Total Amount
Given Four Values Representing Counts Of Quarters, Dimes, Nickels And Pennies, Output The Total Amount

Related Questions

Sue conducted an experiment to determine which paper towel is the most absorbent among three different brands. She decides to present her data using a chart.

Why would Sue want to present her data using a chart?

to analyze alphanumeric data in a table
to analyze alphanumeric values in a spreadsheet
to present numeric values in a visually meaningful format
to present numeric values in a meaningful spreadsheet format

Answers

Answer:

c

Explanation:

What happens when you forward an Outlook contact item to a non-Outlook user?

Answers

Answer:

It's A. The recipient will not be able to open the contact item.

Explanation:

Correct on edg

Answer:

A on edg

Explanation:

Which human job is most similar to the role of a producer

Answers

Answer: Directors

Explanation:  directors create motion pictures, television shows, live theater, commercials, and other performing arts productions. directors work under a lot of pressure, and many are under stress to finish their work on time.  Work hours for producers and directors can be long and irregular.

Surrendering to digital distractions will likely result in better grades true or false

Answers

Answer:

False

Explanation:

Being distracted isn't gonna result in better grades

In cell E13, create a formula using the AVERAGE function
to calculate the average of the values in the range E4:E11.


Answers

USE SOCRACTIC IT WOULD REALLY HELP WITH QUESTIONS LIKE THIS

The average function in Microsoft Excel calculates the mean of the cells.

The required formula is: =AVERAGE(E4:E11)

The syntax of the average function is: =AVERAGE(cells-range)

From the question, the cell range is: cell E4 to cell E11

This means that, the average formula would be:

=AVERAGE(E4:E11)

Hence, the formula to enter in cell E13 is:

=AVERAGE(E4:E11)

Read more about Excel formulas at:

https://brainly.com/question/1285762

What does the fact that online games are so popular most likely prove?
A. People don't like board games.
B. Online games are an influential medium.
C. All games are addictive.
D. Everyone should play online games.

Answers

B. Online games are an influential medium.

2.) Multiple choice questions
1. Which function key is used to update the total in cell?
(a) F7
(b) f8
(c) f9
2. The intersection of a column and row is called a
(a) Border
(b) table
(c) cell
3. Tables group is present on the
tab.
(a) layout
(b) insert
(c) home
4. Which key combination moves the cursor to the previous cell?
(a) Tab + alt
(b) shift + tab (c) none of these
5. Which style affects the selected text within a paragraph?
(a) Character style (b) paragraph style
(c) built-in style

Answers

Answer:

The answer to this question is given below in the explanation section.

Explanation:

Which function key is used to update the total in cell?        

(a) F7

(b) f8

(c) f9      

The intersection of a column and row is called a

(a) Border

(b) table

(c) cell

Tables group is present on the  tab.

(a) layout

(b) insert

(c) home        

Which key combination moves the cursor to the previous cell?

(a) Tab + alt

(b) shift + tab

(c) none of these      

5. Which style affects the selected text within a paragraph?

(a) Character style

(b) paragraph style

(c) built-in style

Harry is creating a PowerPoint presentation and wants all the slides to have a uniform look.

The first thing Harry should do is select the
.

Next, he should use the command groups to edit the
.

Finally, he should save the file as a new
.

Answers

Answer: all answers for test are

Slide Master View

Layout and Theme

PowerPoint Template

A.

C.

Slide Master Thumbnail, Insert Tab, Header &Footer, Slide tab in the dialog box.

D.

C.

D.

Explanation:

The first thing Harry should do is select the Slide Master View, Next, he should use the command groups to edit the Layout and Theme. Finally, he should save the file as a new PowerPoint Template.

What is PowerPoint?

It is a presentation-based programme that employs graphics, movies, etc. to enhance the interactivity and appeal of a presentation.

A saved Powerpoint presentation has the ".ppt" file extension. PPT is another name for a PowerPoint presentation that includes slides and other elements.

This right-sided brain activity is perfectly suited to the principal function of PowerPoint presentations.

For his PowerPoint presentation, Harry wants each slide to have a consistent appearance.

Harry must first choose the Slide Master View before using the command groups to change the Layout and Theme. The file should then be saved as a fresh PowerPoint Template.

Thus, this way, Harry can create a uniform look.

For more details regarding PowerPoint, visit:

https://brainly.com/question/14498361

#SPJ2

How would an assignee enter details, such as mileage and billing information, for a task?

Create a new task, and enter the details.
Open the status report, and enter the details.
In the main task window, click the Details button.
Within the assigned task window, scroll to the bottom.

Answers

Answer:

It's C

Explanation:

On edg

Answer:

C is correct

Explanation:

I got it on edg


Which function will add a name to a list of baseball players in Python?

append()
main()
print()
sort()

Answers

Answer: B I took the test

Explanation:

The function that will add a name to a list of baseball players in Python is main(). The correct option is b.

What is python?

Python is a popular computer programming language used to create software and websites, automate processes, and analyze data. Python is a general-purpose language, which means it may be used to make many various types of applications and isn't tailored for any particular issues.

A function is a section of code that only executes when called. You can supply parameters—data—to a function. The main() function in Python serves as the point at which any software application is executed.

Since the program only runs when it is executed directly, and not if it is imported as a module, the execution of the program can only begin when the main() function is declared in Python.

Therefore, the correct option is b, main().

To learn more about python, refer to the link:

https://brainly.com/question/28966371

#SPJ2

Finally, Su uses the last slide of her presentation as a summary slide. She wants to make sure the text she types automatically fits into the text box without changing the text box.

Which tool can Su use to accomplish this task?

Under which heading is the autofit feature found?

Which option should Su choose?

Answers

Answer:

Format Shape pane

Text Options

Shrink text on overflow

Explanation:

Answer:

Format Shape pane

Text Options

Shrink text on overflow

Explanation:

100%

A top priority of the Federal Bureau of Investigation (FBI) is protecting Internet users from what?
A.) spam marketers
B.) online predators
C.) viruses
D.) unsecured networks

Answers

Answer:

b

Explanation:

Answer:

B. Online Predators

Explanation:

Finally, Lee wants to modify the table he linked to his presentation. How should he begin?

Highlight the table.
Click the table once.
Double-click the table.
Launch the Excel application.

Answers

Answer:

C. double-clike the table

Explanation:

Edg

Answer:

c

Explanation:

Lee has finished formatting his table. He wants to import an Excel table to show the density and mean temperature data of the terrestrial planets.


Which tab should he navigate to?

Which command group should he use?

Which option should he click?

Which button should he click first in the dialog box that opens?

Answers

Answer:

1.  Insert

2. Text

3. Object

4. Create from file

Explanation:

On edg

After formatting his Excel table, Lee should navigate to the Insert tab and use the text command group.

What is an Excel table?

An Excel table can be defined as a rectangular range of data in a spreadsheet document, which comprises cells that are typically arranged by using rows and columns.

In this scenario, Lee should navigate to the Insert tab and use the text command group after formatting his Excel table.

Also, an option which he click is object while clicking on the "create from file" button in the dialog box that opens.

Read more on Excel table here: https://brainly.com/question/13776450

#SPJ2

Use JavaWrite a program that will simulate a change machine found at cash registers. Input the amount due and amount paid from the keyboard.Tell the user how much change is owed and number of quarters, dimes, nickels, and pennies in change a customer would receive.Pay special attention to roundoff error. Your program should use division and modular division. No if’s or loops may be used. You may assume all change will be a positive number with no more than two decimal places. If more than $1.00 is owed, the full value should be included in the number of quarters returned. For example, $2.50 should be returned as 10 quarters.Hint: Modular division is a great way to find the remainder of a division. Think about how you can use this to calculate the change that is left over after some coins are given.Sample Run:Please Enter the Cost of the Item:4.57Please Enter the Amount Paid:5.00Change Owed: 0.43Quarters: 1Dimes: 1Nickels: 1Pennies: 3

Answers

Answer:

Here is the JAVA program:

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

public class Main { // class name

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

   Scanner input = new Scanner(System.in);  // creates Scanner class object to take input from user

   System.out.println("Please Enter the Cost of the Item: ");  // prompts user to enter the cost of item

   double itemCost = input.nextDouble();  //scans and reads the input value of item cost

   System.out.println("Please Enter the Amount Paid: ");  // prompts user to enter the amount paid

   double amount = input.nextDouble();  //scans and reads the value of amount from user

   int change = (int)(amount * 100 - itemCost * 100);  //compute the remaining amount i.e. change

   System.out.println("Change Owed: " + change / 100.0);  // displays the owed change

   int quarters = change / 25;  // computes the value for quarters

   change = change % 25;  // compute the quarters remaining

   int dimes = change / 10;  //  computes dimes

   change = change % 10;  //  computes dimes remaining

   int nickels = change / 5;  // computes nickels

   change = change % 5;  // compute nickels remaining

   int pennies = change;  // computes pennies

   System.out.println("Quarters: " + quarters);  // displays computed value of quarters

   System.out.println("Dimes: " + dimes);  // displays value of dimes

   System.out.println("Nickels: " + nickels);  // displays value of nickels

   System.out.println("Pennies: " + pennies);   }} //displays value of pennies

Explanation:

I will explain the program with an examples.

Suppose the user enters 4.57 as cost of the item and 5.00 as amount paid. Then the program works as follows:

Change is computed as

change = (int)(amount * 100 - itemCost * 100);

This becomes;

change = (int)(5.00 * 100 - 4.57 * 100)

            = 500 - 457

change = 43

Now the change owed is computed as:

change / 100.0 = 43/100.0 = 0.43

Hence change owed = 0.43

Next quarters are computed as:

quarters = change / 25;

This becomes:

quarters = 43/25

quarters = 1

Now the remaining is computed as:

   change = change % 25;

This becomes:

   change = 43 % 25;

  change = 18

Next the dimes are computed from remaining value of change as:

dimes = change / 10;

dimes = 18 / 10

dimes = 1

Now the remaining is computed as:

   change = change % 10;

This becomes:

   change = 18 % 10

  change = 8

Next the nickels are computed from remaining value of change as:

nickels = change / 5;

nickels = 8 / 5

nickels = 1

Now the remaining is computed as:

   change = change % 5;

This becomes:

   change = 8 % 5

  change = 3

At last the pennies are computed as:

pennies = change;

pennies = 3

So the output of the entire program is:

Change Owed: 0.43                                                                                                                Quarters: 1                                                                                                                      Dimes: 1                                                                                                                         Nickels: 1                                                                                                                       Pennies: 3  

The screenshot of the output is attached.

You need to control the number of people who can be in an oyster bar at the same time. Groups of people can always leave the bar, but a group cannot enter the bar if they would make the number of people in the bar exceed the maximum of 100 occupants. Write a program that reads the sizes of the groups that arrive or depart. Use negative numbers for departures. After each input, display the current number of occupants. As soon as the bar holds the maximum number of people, report that the bar is full and exit the program.

Answers

Answer:

count = 0

while True:

   people = int(input("Enter the number of people arrived/departed: "))

   count += people

   

   if count == 100:

       print("The bar is full")

       break

   elif count < 100:

       print("There are " + str(count) + " in the bar currently")

   else:

       print(str(people) + " people cannot enter right now")

       print("The maximum capacity is 100!")

       count -= people

       print("There are " + str(count) + " in the bar currently")

Explanation:

*The code is in Python.

Set the count as 0

Create an indefinite while loop.

Inside the loop:

Ask the user to enter the number of people arrived/departed

Add the people to the count (cumulative sum)

Check the count. If the count is 100, stop the loop. If the count is smaller than 100, print the current number of people. Otherwise, state that they cannot enter right now. The capacity is 100 at most. Subtract the people from the count and print the current number of people.

Which number is equivalent to 72.5e-2?
0.725

72.5

7.25

7250

Answers

Answer:

.725

Explanation:

You are going back 2 spaces.

Answer:

0.725

Explanation:

Edge 2022

Read each description below, and then choose the correct term that matches the description from the drop-down menus.

wireless technology that lets you identify and track objects

medical uses of RFID

a low-power radio wave used for short distances

computing device used with Bluetooth Read each description below, and then choose the correct term that matches the description from the drop-down menus.

wireless technology that lets you identify and track objects

medical uses of RFID

a low-power radio wave used for short distances

computing device used with Bluetooth

Answers

Answer:

wireless technology that lets you identify and track objects  (radio frequency identification)

 

medical uses of RFID  (patient identification)

a low-power radio wave used for short distances  (bluetooth)

computing device used with Bluetooth hands-free microphone in car

Explanation:

sorry if late :/

Answer:

Explanation:

edg 2021

reading is important blank areas of life A in very few B in many C only in academic D only in career​

Answers

Answer:

The answer is B. I'm pretty sure It is

Explanation:

I just took the quiz and it was right  

Write a program that utilizes the concept of conditional execution, takes a string as input, and: prints the sentence "Yes - Spathiphyllum is the best plant ever!" to the screen if the inputted string is "Spathiphyllum" (upper-case) prints "No, I want a big Spathiphyllum!" if the inputted string is "spathiphyllum" (lower-case) prints "Spathiphyllum! Not [input]!" otherwise. Note: [input] is the string taken as input.

Answers

Answer:

Written in Python

inputt = input()

if inputt == "SPATHIPHYLLUM":

     print("Yes - Spathiphyllum is the best plant ever!")

elif inputt == "spathiphyllum":

     print("No, I want a big Spathiphyllum!")

else:

     print("Spathiphyllum! Not"+ inputt+"!")

Explanation:

This line gets user input

inputt = input()

This line checks if input is uppercase SPATHIPHYLLUM and executes the corresponding print statement, if true

if inputt == "SPATHIPHYLLUM":

     print("Yes - Spathiphyllum is the best plant ever!")

This line checks if input is uppercase spathiphyllum and executes the corresponding print statement, if true

elif inputt == "spathiphyllum":

     print("No, I want a big Spathiphyllum!")

If user input is not upper or lower case of Spathiphyllum, the following if condition is considered

else:

     print("Spathiphyllum! Not"+ inputt+"!")

Write your code to define and use two functions. The Get User Values function reads in num Values integers from the input and assigns to user Values. The Output Ints Less Than Or Equal To Threshold function outputs all integers in user Values that are less than or equal to maxVal. num Values indicates the number of integers in user Values. void Get User Values(int user Values[], int num Values) void Output Ints Less Than Or Equal To Threshold (int user Values[], int maxVal, int num Values)

Answers

Answer:

#include <iostream>

#include <vector>

using namespace std;

/* Define your function here */

vector<int> GetUserValues(vector<int>& userValues, int numValues) {

  int tmp = 0;

  vector<int> newVec;

 

  for(int i = 0; i < numValues; i++) {

     cin >> tmp;

     newVec.push_back(tmp);

     

  }

 

  return newVec;

}

void OutputIntsLessThanOrEqualToThreshold(vector<int> userValues, int upperThreshold) {

  for (int i = 0; i < userValues.size(); ++i) {

     if(userValues.at(i) < upperThreshold) {

          cout << userValues.at(i) << " ";

     }

  }

 

  cout << endl;

}

int main() {

  vector<int> userValues;

  int upperThreshold;

  int numValues;

 

  cin >> numValues;

  userValues = GetUserValues(userValues, numValues);

  cin >> upperThreshold;

  OutputIntsLessThanOrEqualToThreshold(userValues, upperThreshold);

  return 0;

}

Explanation:

Perhaps their is a better way to code this, but I couldn't figure out what to do with the pointer in the first function.

Question #1
Dropdown
Choose the word that makes each sentence true.
Asking the user for four numbers is an example of____.

Finding the average of the four numbers is an example of_____.
Telling the user the average is an example of_____.

O input
O output
O processing

Answers

Answer: Dropdown

Choose the word that makes each sentence true.

Asking the user for four numbers is an example of__input__.

Finding the average of the four numbers is an example of__processing___.

Telling the user the average is an example of__output___.

Explanation:

Following are the discussion to the given question:

Input is displayed by asking users for four digits. Any data or information that's also supplied to a system for analysis is referred to as input. Its statement, 'input' tells the system that it uses must enter some data before the software can proceed.The instance of processing is computing the mean of four numbers. In the CPU, computing is the conversion of input information to a more meaningful form of information.An instance of output is giving the user the average. It refers to information produced by and sent through a computer or another electronic device. The act of generating it, the amount generated, or the procedure through which something is given are all instances of output.

Therefore, the answer is "input, processing, and output".

Learn more:

brainly.com/question/2882943

What weight pencil is recommended for darkening lines and for lettering? *

Answers

Answer: darkened

Explanation: darkened

Answer:

While the softer B pencils are generally considered the best for shading, there's no reason to discount the harder H pencils. The HB and H are good choices for fine, light, even shading. However, they too have drawbacks. Pencil grades from HB through H, 2H to 5H get progressively harder and are easier to keep sharp.

Which of these options is an example of a nested structure?A.
for loop
B.
while loop
C.
if-then-else loop
D.
if else inside a for loop

Answers

Answer:

D. if else inside a for loop

Explanation:

Describe the two best practices for making html code more readable.

Answers

Answer:

1 - Commenting and Documentation.

2 - Consistent Indentation.

3 - Avoid Obvious Comments.

4 - Code Grouping.

5 - Consistent Naming Scheme.

6 - DRY Principle.

7 - Avoid Deep Nesting.

8 - Limit Line Length.

Explanation:

Hope this helped

How do I write this in binary number ?

Answers

1/3 ~ 100001.010101...

an exact value cannot be found; therefore, the zeros in ones in this binary representation of 1/3 alternate forever.

Your computer crashed, and you lost many personal and work-related files. You just got a new computer, but you are now much more concerned about viruses and other security threats. Which strategy can help you protect your computer against virus attacks?

Answer choices

A Disable your Web browser's automatic security settings so you can manually control the content you download.

B Open email attachments only from unknown senders.

C Update the definitions on your anti-virus application frequently.

D Perform regular backups of your hard drive.



PLS HELP!
WILL MARK BRAINLIEST!
:)

Answers

Answer: c

Explanation:

c

So I would make sure you back up your device first before you mess with anything in your computer then keep your browsers security settings On just so random files don’t download that may have viruses in it your browser will let you know it there are any viruses in the content you download along with your computer and if you downloaded the program before then you are able to accept the download even if google says it’s a virus

When you set the position property for a block element to fixed, the element

Answers

Answer:

-is positioned relative to the browser window

Hope this helps!

Answer: When you set the position property for a block element to fixed, the element  remains in an exact position on the screen even if the page is scrolled down.

Please answer this please solve it

Answers

Answer:

If you still can't figure it out look this up

nvcc cafe problem

Explanation:

Write a program with three functions: upper , lower , and reverse . The upper function should accept a pointer to a C-string as it's only argument. It should step through each character in the string, converting it to uppercase. The lower function, too, should accept a pointer to a C-string as it's only argument. It should step through each character in the string, converting it to lowercase. Like upper and lower , reverse should also accept a pointer to a string as it's only argument. As it steps through the string, it should test each character to determine whether it is upper- or lowercase. If a character is uppercase, it should be converted to lowercase. Likewise, if a character is lowercase, it should be converted to uppercase. Test the functions by asking for a string in function main , then passing it to them in the following order: reverse, lower , and upper. Main will then print out the strings to demonstrate the functions worked. Each function accepts exactly one argument. None of the functions return anything. None of the functions (other than main) interacts with the user in anyway. Variables of type string are not allowed.

Answers

Answer:

Here is the C++ program:

#include <iostream>  //to use input output functions

#include <cstring>  //to manipulate C-strings

#include <string>  //to manipulate strings

using namespace std;  //to access objects cin cout

//function prototypes

void upper(char *);  to convert to upper case

void lower(char *);  //to convert to lower case

void reverse(char *);  //to convert to reverse case

int main() {  //start of main method

   char input[101];  //creates a char type array to hold input string

   cout << "Enter a string: ";  //prompts user to enter a string

   cin.getline(input, 101);  //reads input string from user

   upper(input);  //calls upper() method to convert the string to upper case

   lower(input);  //calls lower() method to convert the string to lower case

   reverse(input); } //calls reverse() method to convert the string to reverse case

void upper(char *cString){  //method that takes a pointer to a C-string as it's only argument and converts that string to upper case

   cout << "String in upper case: ";  //displays string in upper case

   for(int i = 0; i < strlen(cString); i++){  //iterates through the input string cString until the length of the cString is reached

       if(islower(cString[i]))  //checks if the character at i-th index of cString is in lower case

           cout << (char) toupper(cString[i]);  //converts each i-th character of cString to upper case at each iteration

       else  //if no character of cString is in lower case

           cout << cString[i];    }  //displays the cString as it is

   cout << endl;}  //prints a new line

void lower(char *cString){  //method that takes a pointer to a C-string as it's only argument and converts that string to lower case

   cout << "String in lower case: "; //displays string in lower case

   for(int i = 0; i < strlen(cString); i++){  //iterates through each character using for loop  first character to last

       if(isupper(cString[i]))  //checks if the character at i-th index of cString is in upper case

           cout << (char) tolower(cString[i]);  //converts each i-th character of cString to lower case at each iteration

       else  //if no character of cString is in upper case

           cout << cString[i];    }  //displays the cString as it is

           cout << endl; }  //prints a new line

void reverse(char *cString){  //method that takes a pointer to a C-string as it's only argument and converts that string to reverse case (upper to lower and vice versa)

   cout << "String in reverse case: ";  //displays string in reverse case

   for(int i = 0; i < strlen(cString); i++){  //iterates through each character using for loop  first character to last

       if(isupper(cString[i]))  //checks if the character at i-th index of cString is in upper case

           cout << (char) tolower(cString[i]);  //converts character at i-th position of cString to lower

       else  //if the character is in lower case

           cout << (char) toupper(cString[i]);    }  //converts character at i-th position of cString to upper

   cout << endl;}  //prints a new line

 

Explanation:

I will explain the program with an example.

Lets suppose user enters "hi" as input. So

Now first upper() method is called by passing this C-string to it.

It has a for loop that checks at each iteration, if a character of C-string is in lower using islower method which returns true if the character is in lower case. Since both the characters 'h' and 'i' are in lower in case so they are converted to upper case at each iteration using toupper() method. So the output of this part is:

String in upper case: HI

Now next lower() method is called by passing this C-string to it.

It has a for loop that checks at each iteration, if a character of C-string is in upper using isupper method which returns true if the character is in upper case. Since both the characters 'h' and 'i' are in lower in case so the string remains as it is. So the output of this part is:

String in lower case: hi

Now next reverse() method is called by passing this C-string to it.

It has a for loop that checks at each iteration, if a character of C-string is in upper using isupper method which returns true if the character is in upper case. Since both the characters 'h' and 'i' are in lower so else part: cout << (char) toupper(cString[i]); executes which converts these characters to upper case (reverse case). So the output of this part is:

String in reverse case: HI

The screenshot of program output with a different example is attached.

Other Questions
Kim says the answer to 10 times 3 and StartFraction 8 Over 9 EndFraction is 13 and StartFraction 8 Over 9 EndFraction. Is her answer reasonable? No, because 3 and StartFraction 8 Over 9 EndFraction is about 4, and 10 4 is 40. Yes, because 3 and StartFraction 8 Over 9 EndFraction is about 4, and 10 4 is 14. Yes, because 3 and StartFraction 8 Over 9 EndFraction is about 3, and 10 3 is 30. Yes, because 3 and StartFraction 8 Over 9 EndFraction is about 3, and 10 3 is 13. HELP PLEASE! I don't understand this and I need to done asapCan someone please help fill in this chart?? How does the dramatic irony in the play create tension?Click to read the play.O A. The audience finds out HELPP ASAP PLEASE!!!!!!!!!!that Samantha wants to make money.B. The audience is unaware that Samantha is looking for a job.C. The audience knows about Samantha's perfect job before shedoes.O D. The audience concludes that Samantha wants to work indoors. . The play is summer job fair by Bart king (06.02 LC)Read and choose the option with the correct word or words to answer the question.Soy Juana. No quiero hacer ejercicio, me gusta estar con amigos y mi familia en la casa.Based on the information, what does Juana prefer?1.Pasar el rato sola2.Patinar sobre hielo3.Un partido de ftbol4.Los juegos de mesa Internet bots can sway public opinion by Which feature of a microblog allows a user to repost another user's content? Most major ski resorts oer family programs that provide ski and snowboarding in- struction for children. The typical classes provide four to six hours on the snow with a certied instructor. The following data are the location and the daily rate at 6 ski resorts reported on January 20, 2006. Resort Location Daily Rate Beaver Creek Colorado $137 Deer Valley Utah $115 Diamond Peak California $95 Hunter New York $79 Mount Bachelor Oregon $83 Butternut Massachusetts $108 How many variables are in the data set? ______________ Use whole number, example 3 Ray won't eat cream of wheat cereal. He doesn't particularly enjoy the taste or texture of the cereal. Based on thisinformation, Ray most likely has a problem with theof cream of wheat.A. appearanceB. satiabilityC. availabilityD. palatability A landscaper needs to estimate the amount of material required for a project building a circular brick patio for a client. The diameter of the patio is 13m and one bundle of brick will cover 116ft^2. How many bundles does he need? A carnival ride holds 30 people at a time. In one hour,220 people went on the ride. It was full each timeexcept the last. How many times was the ridecompletely filled? What is the product of 6s and (-2s+4s-10)?A)4s+4s-10B)-2s+10s-10C)-12s+24s-60D)-12s+24s-60s You are creating a business to earn some extra income over the summer. You decide to sell one product that costs you $2.50 to make. You have a total of $2,000 to put towards the cost of starting your business. (Q1.) Does the inequality below represent the above business? Yes No (Q2.) 2.50a 2,000 where a represents the number of $2.50 items manufactured. If you selected no, explain why: (Q3.) How would you go about solving the inequality to know how many items you can manufacture while staying within your $2,000 budget?Please Help!!! Which of the following best identifies a key component of the hydrologic cycle that powers the movement of water and is missing from the diagram?ATerrestrial animalsBThe SunBacteriaDVolcanoes find the 20th term from the last term of the AP:3,8,13,............,253 The lengths of the sides of a triangle are 7. and 10. If the length of the longest side of a similar triangle is 25. what is the length of the shortest side of this triangle? Point of view Assessment 7th grade I have done this for a million times and I always get this one wrong I need the correct answer Please help Ive been stuck on this for over 20 mins! Help me with my math question im gonna give you 10 points just to answer that thankkkkkkkkkkkkkkkkkk you A triangle has an area of 12 square units and a height of 8 units. Find its base.