G+_Dean T Posted February 28, 2014 Share Posted February 28, 2014 Hey guys Im quickly getting the hang of this but want some small challenges that I can try and over come with what I have learnt so far. Can some one give me some program ideas to make with what has been learnt so far in c101 Link to comment Share on other sites More sharing options...
G+_Stephen Hart Posted February 28, 2014 Share Posted February 28, 2014 This is called "FizzBuzz". Do a for loop from 1 to 100 and for each number, ouput to the console.: If the number is divisible by 3, output "Fizz" If the number is divisible by 5 output "Buzz" If it is divisible by 3 and 5, output "FizzBuzz" If it is none of those, output the number to the console. So it should output 1, 2, Fizz, 4, Buzz, Fizz, 7, 8, Fizz, Buzz, 11, Fizz, 13, 14, Fizz Buzz, 16, 17, Fizz, 19, Buzz, Fizz, 22, 23, Fizz, Buzz, 26, Fizz, 28, 29, Fizz Buzz, 31, 32, Fizz, 34, Buzz, Fizz, ... Link to comment Share on other sites More sharing options...
G+_Dean T Posted March 1, 2014 Author Share Posted March 1, 2014 thanks! Link to comment Share on other sites More sharing options...
G+_Joe Maruschek Posted March 1, 2014 Share Posted March 1, 2014 Another common assignment is to determine if a given string is a palindrome. Ignore spaces, punctuation, and capitalization. For example: input: Madam, I'm Adam. output: yes, that is a palindrome input: Taste penne pasta. output: no, that is not a palindrome Link to comment Share on other sites More sharing options...
G+_Pete Murphy Posted March 2, 2014 Share Posted March 2, 2014 I think we have learnt enough to do some simple coding. what I am now writing is very basic where I ask the user for two integers then use a function to return their sum (very basic compared to what others are posting here but fun for a real beginner like me). Eventually i was think about trying to write a game where you guess a number -> Enter a max value, enter a min value then the code creates a random number and the user guesses it with prompts like Higher, Lower etc. It could even calculate the number of turns. from the simple coding we have done so far this will be a real challenge for me but not too difficult. Do post back what you eventually code. Link to comment Share on other sites More sharing options...
G+_Dean T Posted March 2, 2014 Author Share Posted March 2, 2014 I ended up making a love calculator. Do you remember when you were kids (maybe still are) and you have a crush on someone, you would write both names down and compare how many letters appear in the word loves then calculate a percentage of how well suited you were for each other. Well I did that. I have my fingers crossed it gets shown as I have worked for hours on it and I have only been doing c# for a week using c101! You can see my code here http://pastebin.com/5Wv3gwp5 Link to comment Share on other sites More sharing options...
G+_Lee Crocker Posted March 3, 2014 Share Posted March 3, 2014 There's a lot of good basic challenges at CodeEval.com. Link to comment Share on other sites More sharing options...
Recommended Posts