| | |
Noob help!
Please support our C++ advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Oct 2003
Posts: 2
Reputation:
Solved Threads: 0
I stared at it for about a good 30 minutes now and I still can't find anything wrong with it. Can someone help?
C++ Syntax (Toggle Plain Text)
/*This program makes all vowels uppercase. All other constants are lowercase. Keep in mind I make to call a function isvowel() to evluate the character.*/ #include <stdio.h> #include <ctype.h> int isvowel(int ch); int main(void) { int ch; while(ch=getchar()){ if(isvowel(ch)==1) putchar(isupper(ch)); else putchar(islower(ch)); } return 0; } int isvowel(int ch) { if(ch=='a' || ch=='e' || ch=='i' || ch=='o' || ch=='u') return 1; }
•
•
Join Date: Sep 2003
Posts: 81
Reputation:
Solved Threads: 0
Try saying
C++ Syntax (Toggle Plain Text)
int isvowel (int ch) { if (ch=='a' || ch=='e' || ch=='i' || ch=='o' ||ch=='u') return 1; return -1; }
C++ Syntax (Toggle Plain Text)
#include<iostream.h> bool isVowel(char); char toUpper(char); int main() { char my_letter; cout << "Enter character: "; cin >> my_letter; cout << toUpper(my_letter); return (0); } bool isVowel (char letter) { bool to_return = false; if ((letter=='a') || (letter=='e') || (letter=='i') || (letter=='o') || (letter=='u')) to_return = true; return (to_return); } char toUpper(char letter) { if (isVowel(letter)) letter -= ('a' - 'A'); return (letter); }
Dani the Computer Science Gal 
Follow my Twitter feed! twitter.com/DaniWeb
And if you're interested in Internet marketing there is twitter.com/DaniWebAds

Follow my Twitter feed! twitter.com/DaniWeb
And if you're interested in Internet marketing there is twitter.com/DaniWebAds
![]() |
Similar Threads
- I'm such a noob - driver installation (*nix Hardware Configuration)
- NOOB flashback (C++)
- Anyone mind helping out a stuck noob? (Java)
- Noob with a question (IT Professionals' Lounge)
- Clearing screen in Python (was: omg noob prob plz help) (Python)
- Help the IT noob, i experience laggy and delay online game. (Networking Hardware Configuration)
- perl script help re: scope/structure for noob (Perl)
- Noob needs Wireless Network / router help. (Networking Hardware Configuration)
- This NOOB Needs Help (Networking Hardware Configuration)
- Noob question about Defining and Declaring. (C++)
Other Threads in the C++ Forum
- Previous Thread: problems wid cpp files
- Next Thread: Interpretation of an instructors C++ program...
| Thread Tools | Search this Thread |
add api array arrays beginner binary bitmap c++ c/c++ calculator char class classes code compile compiler console conversion convert count data database delete desktop developer directshow dll dynamic encryption error file forms fstream function functions game generator getline google graph homeworkhelper iamthwee ifstream input int integer java lib linkedlist linker linux loop looping loops map math matrix memory microsoft multidimensional newbie news node number output parameter pointer problem program programming project proxy python random read recursion recursive return string strings struct studio template templates test text tree unix url variable vector video visual visualstudio win32 windows winsock word wordfrequency wxwidgets






