DIDNEY WORL

WELCOM
 
StartseiteStartseite  PortalPortal  AnmeldenAnmelden  Login  
THE GRAPHIC BELOW IS AN ADVERTISEMENT

Teilen | 
 

 The question to the universe

Vorheriges Thema anzeigen Nächstes Thema anzeigen Nach unten 
AutorNachricht
Skullking
WHMT Member
WHMT Member
avatar

Männlich Number of posts : 1198
Age : 26
Location : Lollipop Playland killing the loin
User Title : Wise-man PuRpLeDuDe
Mood :
Attendance : Present
Registration date : 23.02.07

BeitragThema: The question to the universe   So Aug 15, 2010 5:19 pm

Ok through my failed programing where I missed out a couple of lines Embarassed

I have somehow ended up with the question to the universe


Yup, how many e's are there in "The quick brown fox jumped over the fence."?

or is it
How many 101's are there in "The quick brown fox jumped over the fence."?

or is it
How many 69's are there in "The quick brown fox jumped over the fence."?

doesn't matter they all give the same answer!
lol.
Nach oben Nach unten
http://skullking.subjectonline.com/
WarHampster
Site Admin
Site Admin
avatar

Männlich Number of posts : 4841
Age : 23
Location : My Stately Pleasure-Dome
User Title : The People's Admin
Mood :
Attendance : Present
Registration date : 20.11.06

BeitragThema: Re: The question to the universe   So Aug 15, 2010 5:25 pm

Lol, post the source.

______________________________________________
Merzbow schrieb:
I want to make silence by my Noise. Maybe, that is a fascist way of using sound.
Nach oben Nach unten
http://warhampster.editboard.com
Skullking
WHMT Member
WHMT Member
avatar

Männlich Number of posts : 1198
Age : 26
Location : Lollipop Playland killing the loin
User Title : Wise-man PuRpLeDuDe
Mood :
Attendance : Present
Registration date : 23.02.07

BeitragThema: Re: The question to the universe   So Aug 15, 2010 5:29 pm

I fixed the counting, knew exactly what was wrong, But I can't change the uppercase and lowercase printing?
Code:
cout << "The number of occurrences of "
        << tolower( letter )
        << " is "
        << lowerCase
        << endl
        << "The number of occurrences of "
        << toupper( letter )
        << " is "
        << upperCase
        << endl
        << "The total number of occurrences is "
        << total;

letter is the char variable that the user has choosen the search for.
lowerCase, upperCase, total are all int variables that counted the "occurrences."

Edit: I am an idoit
I got it all fixed now heres the new code:

Code:
   
   int total = 0;
   int lowerCaseCount = 0;
   int upperCaseCount = 0;
   char lowerCase = tolower( letter );
   char upperCase = toupper( letter );

          cout << "The number of occurrences of "
        << lowerCase
        << " is "
        << lowerCaseCount
        << endl
        << "The number of occurrences of "
        << upperCase
        << " is "
        << upperCaseCount
        << endl
        << "The total number of occurrences is "
        << total;

with the new variables to catch to upper/lower it prints fine now lolol.

I also had to change bits and pieces when renaming >.<
Nach oben Nach unten
http://skullking.subjectonline.com/
WarHampster
Site Admin
Site Admin
avatar

Männlich Number of posts : 4841
Age : 23
Location : My Stately Pleasure-Dome
User Title : The People's Admin
Mood :
Attendance : Present
Registration date : 20.11.06

BeitragThema: Re: The question to the universe   So Aug 15, 2010 6:45 pm

Good old cin and cout!

______________________________________________
Merzbow schrieb:
I want to make silence by my Noise. Maybe, that is a fascist way of using sound.
Nach oben Nach unten
http://warhampster.editboard.com
Skullking
WHMT Member
WHMT Member
avatar

Männlich Number of posts : 1198
Age : 26
Location : Lollipop Playland killing the loin
User Title : Wise-man PuRpLeDuDe
Mood :
Attendance : Present
Registration date : 23.02.07

BeitragThema: Re: The question to the universe   So Aug 15, 2010 9:23 pm

oh and my formatting isn't bad like what you see, its just for some reason when I copy the code from the schools compiler it goes all screwy lol.
Nach oben Nach unten
http://skullking.subjectonline.com/
Gesponserte Inhalte




BeitragThema: Re: The question to the universe   

Nach oben Nach unten
 
The question to the universe
Vorheriges Thema anzeigen Nächstes Thema anzeigen Nach oben 
Seite 1 von 1
 Ähnliche Themen
-
» Marvel Universe Galactus....
» DC UNIVERSE INFINITE HEROES FOR SALE
» Rare Marvel Universe Figures ?
» DC Universe Classics and Masterpiece transformers in ToysRus, CRAZY.
» Marvel Universe 2 packs (Cyclops/Marvel Girl - Wolverine Sabretooth)

Befugnisse in diesem ForumSie können in diesem Forum nicht antworten
DIDNEY WORL :: Misc :: Miscellaneous-
Gehe zu: