Monday, July 27, 2009

I need an idea for...?

a very simple C++ program I can make for my highschool class.





When I say simple, I mean simple. Requirements include strings, char variables, a 'for' loop, nested loops and a calculation of some sort.





I have the code to generate a random number as well.





I have hit a creative block today, and ideally I need an idea for tomorrow. So, if anyone can give me something easy and simple to meet those requirements, I'm all ears!





Thanks,





-Bacon

I need an idea for...?
WHAT !?!


I think I need to go back to high school !


In English PLEASE !!
Reply:When I was in a C++ class a few years ago, I made a vending machine program. I used the graphics library and drew it out of boxes, nothing to hard, but very entertaining.
Reply:I suggest you a code some sort tool that encodes a String according to a char array of 26 characters.





"zyxwvtu.......cba"





Loop through each character and replace the letters in the string by using the position in the char array - the ascii offset.





Have fun
Reply:How about a program that would prompt the user for a word, then it would transpose it character by character.





Example Input: top


Example Out: pot





You could even have it count the number of characters and display them if you want.
Reply:Prime numbers, multiplication tables,





palindrome(a word which is same as its reverse), pyramid,





or may be taking a word and printing it in asterix.
Reply:How about a program that adds/subtracts/multiplies, etc. two numbers together. Prompt the user for the numbers and it spits out the answer.





When I was in college, I wrote a "simple" Fortran program that converted Roman Numerals to numbers, or maybe the other way around, I can't remember. But you would just enter one and it would calculate the other.





- Rich


No comments:

Post a Comment