Warning: The magic method Slickr_Flickr_Plugin::__wakeup() must have public visibility in /home/kenbauer/public_kenscourses/tc101fall2015/wp-content/plugins/slickr-flickr/classes/class-plugin.php on line 152
Warning: Cannot modify header information - headers already sent by (output started at /home/kenbauer/public_kenscourses/tc101fall2015/wp-content/plugins/slickr-flickr/classes/class-plugin.php:152) in /home/kenbauer/public_kenscourses/tc101fall2015/wp-includes/feed-rss2.php on line 8 ‘Strings’ Articles at TC101 Fall 2015
https://kenscourses.com/tc101fall2015
Introduction to Programming Python and C++Wed, 25 Nov 2015 05:08:39 +0000en
hourly
1 https://creativecommons.org/licenses/by/4.0/Mastery 25
https://kenscourses.com/tc101fall2015/2015/mastery-25-6/
Wed, 25 Nov 2015 05:08:39 +0000http://opezaimd.tumblr.com/post/133909859880On this mastery I’ll show you what are strings and how to use them in C++.
String are things that are represented by a sequence of characters.
We will create a function that works as a palindrome and tells the user if the word he input is a palindrome or not. Do as follows:
Create a main program and leave a space before it for the function
Create a function of type string called palindrome
Condition the user input with VARIABLE.rbegin and VARIABLE.rend. This iterators make the string return reversed to the beginning and end. This is the Palindrome “function”
In main(), ask the user for the input and call for the function.
Your program should look something like this:
Now let’s test it:
Great! Now you know how to do a basic program using string. If you want to learn more about strings, go to this webpage:
]]>On this mastery I’ll show you what are strings and how to use them in C++.
String are things that are represented by a sequence of characters.
We will create a function that works as a palindrome and tells the user if the word he input is a palindrome or not. Do as follows:
Create a main program and leave a space before it for the function
Create a function of type string called palindrome
Condition the user input with VARIABLE.rbegin and VARIABLE.rend. This iterators make the string return reversed to the beginning and end. This is the Palindrome “function”
In main(), ask the user for the input and call for the function.
Your program should look something like this:
Now let’s test it:
Great! Now you know how to do a basic program using string. If you want to learn more about strings, go to this webpage: