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]
3 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]3 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
What is the reason of non-deterministic (indeterminate) behavior of concurrent programs?
murzikaleks [220]

Answer: Concurrent programs are the programs that execute at the same point of time. They are simultaneous in nature with other concurrent programs.They are executed with the help of threads  to achieve the concurrency without the issue of scheduling. They are consider long running programs.

The program that has the low execution time compared with all other programs gets executed first.If the case of no progress is seen then another thread is executed.This type of execution gives the non- deterministic situation in which the possibility of leading completion of any particular program cannot be determined.

5 0
2 years ago
What is the symbol for the relational operator 'equal to'?
rosijanka [135]
= hope this help :) :)
6 0
2 years ago
-What does VI indicate when talking about LabView?
BaLLatris [955]

Answer:

The VI in LabView indicates c-Virtual Instrument

Explanation:

The VI in LabView is a program-subroutine. The VI stands for Virtual Instrument. The VI is composed of a Block diagram, Connector panel and a Front Panel.

4 0
3 years ago
Evidence left behind by participants or observers is an example of what kind of resource?
Natasha2012 [34]
The answer should be D
6 0
3 years ago
Read 2 more answers
write a pseudo code that will allow a user to enter a number and divide that number by eleven and take the the modules of the en
emmasim [6.3K]

Answer:

sdhuvbfuisg

Explanation:

4 0
3 years ago
Other questions:
  • Jennifer has written a short story for children. What should be her last step before she submits the story for publication?
    11·1 answer
  • Xml is used to format the structure and style of a web page. true or false
    7·1 answer
  • Plz help ASAP
    10·1 answer
  • Greg is the purchasing manager at a jeans-manufacturing company. He knows he could save his company money by using cheaper, thin
    10·1 answer
  • For businesses and organizations under recent compliance laws, data classification standards typically include private, confiden
    11·1 answer
  • In preparing his persuasive presentation, Reza should most likely focus on clearly presenting his
    6·2 answers
  • Despite the rise of messaging apps and other forms of social media, these efforts are focused on consumer efforts, with corporat
    7·1 answer
  • The processing power of a computing device is measured by its _____.
    10·1 answer
  • A small company with 100 computers has hired you to install a local area network. All of the users perform functions like email,
    9·1 answer
  • What three best practices can help defend against social engineering attacks?
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!