Code Newbie
News     Forums     Search     Members     Sign Up    

My Code Newbie
Username

Password

Articles/Snippets
ASP Classic
ASP.NET
C
C#
C++
HTML / CSS
Java
Javascript
Linux / BSD
Perl
PHP
Python
Ruby
SQL
VB 6
VB.NET

C.N. Friends
  Planet Rome

Link to Us!
Code Newbie
  Code Newbie
    forums
Old 09-23-2005, 09:16 AM   #1 (permalink)
josh2two
Registered User
 
Join Date: Sep 2005
Posts: 22
josh2two is on a distinguished road
Help!! I'm stumped!

Prompts the user to enter a string. Manipulate the string as in the example below.

Enter a string: hello
After capitalizing the first letter of this string it becomes: Hello
After capitalizing the last letter of this string it becomes HellO
After adding three to the first letter of this string it becomes KellO
After swapping the first and last letters of this string it becomes OellK


This is what i have so far: (excluding #includes)

char message[50];
cout<<"Enter a string: ";
cin>> message;
cout<<"After capitalizing the first letter of this string it becomes: ";
message[0] = toupper (message [0]);
cout<<message;
cout<<"\n""After capitalizing the last letter of this string it becomes: ";

cout<<message;
cout<<"\n""After adding three to the first letter of this string it becomes: ";

cout<<message;
cout<<"\n""After swapping the first and last letters of this string it becomes: ";

cout<<message<<"\n""\n";
system("PAUSE");
system("CLS");
josh2two is offline  
Old 09-23-2005, 10:31 AM   #2 (permalink)
Valmont
[code][/code] enforcer
 
Valmont's Avatar
 
Join Date: Mar 2003
Location: Netherlands
Posts: 1,544
Valmont is on a distinguished road
*** Locked ***

Study the sample from Redhead and work your way up with that first. If you encounter more problems afterwards then POST your code first. Then we'll provide more to-the-point help.
__________________
Valmont is offline  
Closed Thread

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Stumped about a random number ... metazai PHP 4 01-11-2005 01:40 PM


All times are GMT -8. The time now is 03:48 AM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.0.0 RC8





Copyright © 2000-2008, Milano Interactive
Web Hosting provided by Portal 360 Web Hosting