English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

4 answers

Here is a c++ code for doing it..... :

#include
main()
{
char *textLine = new char[80];
int i = 0;
cout<<"Enter the line of text :";
cin.getline(textLine, 80,'\n');
while(textLine[i] != '\0'){
if(isupper(textLine[i]))
cout<<(char)tolower(textLine[i]);
else
cout<<(char)toupper(textLine[i]);
i++;
}
cout< return 0;
}

2007-03-26 07:28:01 · answer #1 · answered by fmb 1 · 0 0

yeah, you kind of (really) need the language
however, if you're in vb, you can say if it's uppercase, then string.(whatever command you use to make it lowercase)

i kind of forgot vb

anyways, you can also try it in c++ by saying if the character in the string (which is also an array, so you can use a loop to go through this) is between a certain ascii code of capital letters, then subtract a constant number that gets you to the lowercase version of that letter and vice versa
you can get the codes at lookuptables.com
and to get the ascii code of a character in a word, you can do char(string[x])

hope that helps... if you're in vb or c++

2007-03-26 07:22:03 · answer #2 · answered by cookiegal123 1 · 0 0

i'm fairly stoic so i won't be able to truly make and describe thoughts realistically if i do no longer do a splash analyze. i'm additionally no longer a good speaker so writing communication immediately with out it sounding awkward is likewise a venture. different than that, plot holes, a number of that are obtrusive on the 1st reread. I plan to triumph over the 1st with the help of doing a splash analyze, watch movies of ways human beings react while feeling a undeniable emotion. Then i exploit that for describing in my tale. the 2nd, many times after plenty questioning (and rewriting), i might arise with something real looking adequate. So i'm going to might desire to do some no longer hassle-free artwork on that. the 0.33 I triumph over with the help of rereading my plot and back and back back till i won't be able to locate yet another plot hollow. Then I rewrite it. BQ: i do no longer likely positioned plenty emotion in it, extra regularly purely description. Like this: "He confirmed a splash of sadness." or "Anger flashed in her eyes.". So that's frequently purely easy description of thoughts. i do no longer likely describe them too properly intimately.

2016-10-20 11:58:28 · answer #3 · answered by Anonymous · 0 0

What programming language are you writing it in?? How can we help with (what seems to be) homework if we don't know what we're doing?

2007-03-26 06:55:17 · answer #4 · answered by spl 4 · 0 0

fedest.com, questions and answers