5. convertToUpper - Given an input string, the function converts all alphabetic characters to uppercase. Write the new string into an output file called Upper.txt and return true. If the input string is empty just return false. The function header is: bool convertToUpper(const string & st)

Answers

Answer 1
Answer:

Answer:

#include <iostream>

#include <cstring>

#include <fstream>

using namespace std;

bool convertToUpper(const string &st);

int main()

{

string s;

cout << "Enter the string: " << endl;

getline(cin, s);

convertToUpper(s);

return 0;

}

bool convertToUpper(const string &st) {

if(st.length() == 0) {

return false;

} else {

ofstream myfile;

myfile.open ("Upper.txt");

for(int i=0;i<st.length();i++) {

if(st[i]>='a' && st[i]<='z') {

myfile << (char)toupper(st[i]);

} else {

myfile <<st[i];

}

}

myfile.close();

}

 

}


Related Questions

Assume: Memory: 5 bit addresses Cache: 8 blocks All memory locations contain valid data If the memory location is 9. What is the Binary Address and cache block # If the memory location is 12. What is the Binary Address and cache block # If the memory location is 15. What is the Binary Address and cache block #
Repeat Programming Project 5 but in addition ask the user if he or she is a. Sedentary b. Somewhat active (exercise occasionally) c. Active (exercise 3–4 days per week) d. Highly active (exercise every day) If the user answers "Sedentary," then increase the calculated BMR by 20 percent. If the user answers "Somewhat active," then increase the calculated BMR by 30 percent. If the user answers "Active," then increase the calculated BMR by 40 percent. Finally, if the user answers "Highly active," then increase the calculated BMR by 50 percent. Output the number of chocolate bars based on the new BMR value.
Define a forest root domain.
What is not recyclable in ahybrid carhydrogen carpetrol car
Write a program segment that simulates flipping a coin 25 times by generating and displaying 25 random integers, each of which is either 1 or 2

A computer with a frequency 2 GHZ and its average cycle per instruction is 2. what is the MIPS of the computer?

Answers

Answer:

The correct answer is 1000 MIPS.

Explanation:

Using the rule of three you can solve the needed cycles to complete 1.000.000 instructions.

  • 1 instruction -> 2 cycles
  • 1.000.000 instructions -> x cycles.

1.000.000 instructions multiplied by 2 cycles, divided by 1 instruction is equal to 2.000.000 cycles to complete 1.000.000 instructions.

To find the MIPS you have to divide the frequency by the cycles needed to complete 1.000.000 instructions.

MIPS = 2GHZ / 2.000.000 cycles = 1000 MIPS.

In ____________, a large address block could be divided into several contiguous groups and each group be assigned to smaller networks.

Answers

Write the answers so we can answer your question

Who do you think larger or smaller clients will benefit most from MasterCard’s analytics tools? Why?

Answers

Answer:The key to analytics success is not about searching for answers, ... If you are trying to determine where to find new customers, there is a recipe for how to do that, and it ... As we work with small businesses, we help them answer their big ... Moving forward, there is going to be a lot more data of varying types.

Explanation:

Cloud storage refers to the storage of data on ______.a. your mobile device.b. your desktop computer.c. an external drive.d. a server on the Interne.

Answers

The correct answer is:

Cloud storage refers to the storage of data on a server on the internet.

Every organization relies on data, In our daily job, we all make use of a huge amount of data(either in gigabytes or terabytes). And if you have a lot of files on your computer, it's probable that your computer may lose momentum and slow down, resulting in bad performance. While there are several external storage options available for storing and backing up your data, these devices are not infallible. Any incident, such as theft, or damage, might result in the loss of vital data.

This is where Cloud Storage comes into play. Cloud storage is a handy and dependable method of storing and retrieving information on the internet.

It is a cloud computing system in which data is stored on the server-side of the Internet and is managed and operated by a cloud computing provider. 

Therefore, from the above explanation, we can conclude that the correct Option is D

Learn more about Cloud Storage here:

brainly.com/question/23073532?referrer=searchResults

Answer:

D.  server on the internet

Explanation:

Discuss thefactors that are vital to achieve clarity in themessage?

Answers

Answer:

The clarity factor suggest that if there is lack of clarity communication can do a great deal of damage. The Clarity Factor is a perfect example of a well chosen words and well written sentences can get the most complicated in the message across the number of people in the least amount of the time.

The factors that are vital to achieve clarity in the messages are:

  • Your mind has to process everything that create space cross your vision. If your home and your work environment is messy, then it results in brain messy. So, be clear with your thoughts and vision.
  • Passionate about your work and life and then create thoughts.  
  • When you are writing just write, be focused with your work.

Gus is developing new software in an environment in which incremental changes are released at regular intervals within a timebox. Shana is developing software for the minimum viable product stage in order to provide the development team with feedback on how to improve the application. Gus is employing the software methodology known as __________, while Shana is employing the software methodology known as __________.

Answers

Gus is employing the software methodology known as "Agile", where incremental changes are released at regular intervals within a timebox.

Given that;

Gus is developing new software in an environment in which incremental changes are released at regular intervals within a timebox.

Now Gus is employing the software methodology known as "Agile", where incremental changes are released at regular intervals within a timebox.

This approach allows for flexibility and adaptability in response to changing requirements and customer feedback.

Shana, on the other hand, is employing the software methodology known as "Lean Startup", specifically focusing on the minimum viable product (MVP) stage.

The Lean Startup methodology emphasizes rapid iteration and feedback cycles to quickly validate ideas, test assumptions, and gather insights for continuous improvement.

Hence, Both Gus and Shana are using different methodologies that align with their respective goals and stages of software development.

Learn more about the methodology;

brainly.com/question/30261646

#SPJ3

Answer: Agile, Lean

Gus is employing the software methodology known as agile, while Shana is employing the software methodology known as lean.