English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

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

2006-11-01 14:58:50 · 6 answers · asked by Canadian Bacon 3 in Computers & Internet Programming & Design

Godchick...there's nothing wrong with my English. I think you're right about your need for re-education.

2006-11-01 15:12:18 · update #1

6 answers

WHAT !?!
I think I need to go back to high school !
In English PLEASE !!

2006-11-01 15:10:23 · answer #1 · answered by godchick 2 · 0 1

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

2006-11-01 23:12:08 · answer #2 · answered by Wildjoe182 5 · 0 0

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

2006-11-01 23:10:27 · answer #3 · answered by Rich 2 · 0 0

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.

2006-11-01 23:34:01 · answer #4 · answered by JSalakar 5 · 0 0

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.

2006-11-01 23:40:59 · answer #5 · answered by Kanan 1 · 0 0

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.

2006-11-02 02:14:14 · answer #6 · answered by manoj Ransing 3 · 0 0

fedest.com, questions and answers