Post a New Question

C++ programming computer

posted by .

I'm having some trouble trying to program these problems and putting them into the main function. Please help me by giving some advice or website that offer good information for me.
The questions are below here:
1. Write a function that accepts a string of characters from a user and displays the string one word per line.
2. Write a function that accepts a string of characters, then output all the characters of the string in a reversed order.
3. Write a function that counts the number of words in a string. A word is encountered whenever a transition from a blank space to a non-blank character is encountered. Assume that the string contains only words separated by blank spaces.
4.Write a function that accepts a string from a user and convert all lower case letters to upper case letters and also eliminates all blank spaces in the string.

Write a program that tests all the above functions.

  • C++ programming computer -

    1. Use a string function to look for a space in the string, then print the substring between the beginning/last space as a word.
    2. Don't know if there is a string function to do that. If not, read the string backwards, one character at a time and print as you go.
    3. So the blank space is your "delimiter" of words. Locate sequentially all the spaces, and declare it a word if the current space does not follow immediately the preceding one. That is to say, if it is not a zero length word.
    4. You will use the toupper() function, and find a function to delete a substring (blank).

    Post if you have further questions.

  • C++ programming computer -

    Write a program that asks the user to enter the student’s name (first and last), and his/her first exam grade of three students, and then display them in a neat format. After that the program will find the average of the three grades, and print it

Respond to this Question

First Name
School Subject
Your Answer

Similar Questions

  1. Programming

    Hi. I am taking a computer programming class (C++). I need some help on some programs. I tried going to my teacher - he was of no help and there are no tutors. I have a lot of code, but I'm having problems. I looked online for help, …
  2. Science

    Can you recommend some good website to use for this project?
  3. Economics.

    I need some help please. I am trying to find some resources to help me with this does anyone know of a good article or website?
  4. history

    Ok i am having trouble with my world history homework questions........Please HELPPPP!!!!!!!!!!!!!!!!!?
  5. Environmental science ..

    Hi, Can any offer some advice please.... I hav been asked to draw a spray diagram for a Water Issue, I have chosen a "drought" issue ... no problem drawing spray diagram etc etc However the I have to explain how The water issue chosen …
  6. Calculus

    Hi there i am having some problems trying to do my calculus homework and i really need help on how to show the step to proof the volume of a sphere which is V= 4/3pirsquare. But I have to use triple integral to proof the volume of …
  7. ACC305 Accounting for Decision Making

    I am trying to get my research paper done, but I am having some trouble find the information that I am looking for on the company Bausch & Lomb. Here are the question that I am having trouble finding information for. 1. Who within …
  8. ACC305 Accounting for Decision Making

    I am trying to get my research paper done, but I am having some trouble find the information that I am looking for on the company Bausch & Lomb. Here are the question that I am having trouble finding information for. 1. Who within …
  9. Socials

    I had posted some of these questions a few days ago, but i had trouble finding the answers to these questions in the sites. Can you please answer them with giving sites. Thanks :) what are some fun things to do in guadeloupe(ex: biking, …
  10. computer programing

    please need some help here not sure how to do this and need to have it in by sunday night can anyone help me please. Here what I need to do Create a program that uses a menu with options to enter information about monsters (monster …

More Similar Questions

Post a New Question