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
Gnesinka [82]
4 years ago
13

In this lab, you complete a partially written C++ program that includes built-in functions that convert characters stored in a c

haracter array to all uppercase or all lowercase. The program prompts the user to enter nine characters. For each character in the array, you call the built- in functions tolower() and toupper(). Both of these functions return a character with the character changed to uppercase or lowercase. Here is an example: char sample1 = 'A'; char sample 2a'; char result1, result2; result1 = tolower(sample1); result 2 = toupper(sample 2); The source code file provided for this lab includes the necessary variable declarations and the necessary input and output statements. Comments are included in the file to help you write the remainder of the program.
Computers and Technology
1 answer:
Sunny_sXe [5.5K]4 years ago
3 0

Answer:

#include <iostream>

using namespace std;

int main()

{

   const int LENGTH = 9;

   char sample1[LENGTH];

   char sample2[LENGTH];

   

   cout << "Enter 9 characters to be converted to uppercase: ";

   

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

   

       cin >> sample1[i];

       sample1[i] = toupper(sample1[i]);

       cout << sample1[i];

   }

   cout << endl;    

   cout << "Enter 9 characters to be converted to lowercase: ";

       

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

       

       cin >> sample2[i];

       sample2[i] = tolower(sample2[i]);

       cout << sample2[i] ;

   }

   return 0;

}

Explanation:

- Declare the variables

- Ask the user for the characters

- Using for loop, convert these characters into uppercase and print them

- Ask the user for the characters

- Using for loop, convert these characters into lowercase and print them

You might be interested in
A _________ is the broadcast of various types of media over the web.
Dmitry [639]
News Report.
I hope this helps! :)
4 0
4 years ago
Read 2 more answers
How do i code........​
wlad13 [49]

Explanation:

What code are you talking about?

4 0
3 years ago
Read 2 more answers
You want to allow members of the users group to use fdisk on the /dev/sda drive (and only that drive) and to use the yum command
masya89 [10]

Answer:

su ,sg and sudo command.

Explanation:

Whenever the user needs to enable workgroup mates should use fdisk including just that disk on both the /dev / sda disk, using the following command to update and configure the following packages. Thus he uses the command su, sg, and sudo.

So, the following commands are required according to the following statement.

6 0
3 years ago
Write a program that reads three integers as inputs, and outputs the largest of the three values.
AlexFokin [52]

The software is written in C++ and may be found in the explanation section below. C++ keywords and symbols are all capitalized. The least number of all three integers is determined via a nested if-else decision branch. After you've entered three integers, the application prints the least of them all.

<h3>What is the example of C++?</h3>

#include <iostream>

using namespace std;

int main() {

  int num1,num2,num3;

  cout<<"enter first integers"<<endl;

 cin>>num1;

  cout<<"enter second integers"<<endl;

  cin>>num2;

 cout<<"enter the third integers"<<endl;

  cin>>num3;

  if(num1<num2){

     if(num1<num3){

          cout<<"Smallest integer is "<<num1<<endl;

    } else{

          cout<<"Smallest integer is "<<num3<<endl;

      }

 }else {

 if(num2<num3){

    cout<<"Smallest integer is "<<num2<<endl;

} else{

    cout<<"Smallest integer is "<<num3<<endl;

     }

}

return 0;

}

Thus, it is written in C++ language.

For more details about C++ click here:

brainly.com/question/19581899

#SPJ1

3 0
2 years ago
CASE II AziTech is considering the design of a new CPU for its new model of computer systems for 2021. It is considering choosin
34kurt

Answer:

(a)The CPU B should be  selected for the new computer as it has a low clock cycle time which implies that it will implement the process or quicker when compared to the CPU A.

(b) The CPU B is faster because it executes the same number of instruction in a lesser time than the CPU A .

Explanation:

Solution

(a)With regards to  the MIPS performance metric the CPU B should be chosen for the new computer as it low clock cycle time which implies that it will implement the process or quicker when compared to the CPU A and when we look at the amount of process done by the system , the CPU B is faster when compared to other CPU and carries out same number of instruction in time.

The metric of response time for CPU B is lower than the CPU A and it has advantage over the other CPU and it has better amount as compared to CPU A, as CPU B is carrying out more execution is particular amount of time.

(b) The execution can be computed as follows:

Clock cycles taken for a program to finish * increased by the clock cycle time = the Clock cycles for a program * Clock cycle time

Thus

CPU A= 5*10^6 * 60*10^-9 →300*10^-3 →0.3 second (1 nano seconds =10^-9 second)

CPU B= 3 *10^6 * 75*10^-9 → 225*10^-3 → 0.225 second

Therefore,The CPU B is faster as it is executing the same number of instruction in a lesser time than the CPU A

6 0
3 years ago
Other questions:
  • Deterime the minimum number of multiplication operations needed to compute the following. Show the order of the computations.
    10·1 answer
  • What are the meaning master files<br>​
    8·1 answer
  • What are the coordinates of (3 comma space 8 )relative to the basis open curly brackets space (1 comma space 1 )comma space (0 c
    15·1 answer
  • What is the purpose of system calls, and how do system calls relate to the OS and to the concept of dual-mode (kernel-mode and u
    14·1 answer
  • Select the correct answer. What has enabled engineers to design slim and sleek television sets? A. using Nipkow disks B. increas
    7·1 answer
  • Hey guys im just curious.... whats ur favorite number
    6·2 answers
  • Write a couple of paragraphs about the usefulness of computer​
    5·1 answer
  • Which of the following is a valid c++ identifier a. mouse b. _int c. 2_stop d. float​
    10·1 answer
  • Write a complete program that declares an integer variable
    7·1 answer
  • What are some legal issues that can arise from the use of social media?
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!