Skip to content

Latest commit

 

History

History
100 lines (83 loc) · 6.87 KB

Readme.md

File metadata and controls

100 lines (83 loc) · 6.87 KB

Small projects to learn C++ and Rust.

List from http://www.cplusplus.com/forum/beginner/3473/

Beginner

  1. Write a programme which finds the factorial of a number entered by the user. (check for all conditions).
  2. Develop a programme to convert currency X to currency Y and vice versa.
  3. Write a programme that prints out a triangle from largest to smallest; user inputs the largest number. Eg:
*****
****
***
**
*
  1. Write a programme that prints out a triangle from smallest to largest; user inputs bottom number. Eg:
*
**
***
****
******
  1. Print out a triangle from smallest to largest, skipping even rows. User inputs largest number, eg:
*
***
*****
*******
  1. Develop a programme that uses a randomly generated number to select 1 of 3 (or more) functions to show the user.
  2. Guessing game. ask the user to guess a number between 1 and a 100. If you guessed correctly, it will say you win. If you're too high or too low it will also let you know.
  3. Create a programme which generates Fibonacci series til a number 'n', where 'n' is entered by the user. Eg if the user enters 10 then the output would be: 1 1 2 3 5 8
  4. Given a string, determine how many of the characters are vowels and how many are consonants. Terminate the string when the input character encountered is non-alphabetic.
  5. Find the Fifth root of the sum of the squares of the first 100 ODD numbers only.
  6. List all possible combinations of letters in a 4-letter word. Eg 'TEST' can be unscrambled as TEST, TETS, TSET, TSTE, TTSE, TTES, etc.
  7. Make a programme that allows the user to input either the radius, diameter, or area of the circle. The programme should then calculate the other 2 based on the input.
  8. Read a line of text and write it out backwards using a recursive function.
  9. Write a programme to simulate a simple calculator. It should accept two numbers from the user along with the required operation to be performed. Addition, subtraction, division and multiplication are the basic operations that should be implemented. Feel free to implement other operations. Bonus points for splitting the calculation functions into a separate module.
  10. Determine how much money is in a piggy bank that contains several £2 coins, £1 coins, 50p coins, 20p coins, 10p coins and 5p coins. Use the following values to test your programme: one £2, three £1, five 50p coins, two 20p coins, one 10p coin and fifteen 5p coins.
  11. Create a simple palindrome checker programme. The programme should allow the user to enter a string and check whether the given string is a palindrome or not. Only digits and alphabets should be considered while checking for palindromes - any other characters are to be ignored.
  12. Write a programme that allows you to input students' midterm, final and homework scores, and calculate a weighted score. Use the following weights: 20% midterm, 40% final, 40% median homework.

Intermediate

  1. Simple file encryption (using something simple like ROT13).
  2. Write a programme which will print all the pairs of prime numbers whose sum equals the number entered by the user. Eg 10 = 5 + 5, 7 + 3; 12 = 11 + 1, 5 + 7
  3. Write a quiz which retrieves a question and answer from a file. Allow the user to take the quiz, count points total and show score.
  4. Read XHTML, remove the tags, then print out the remaining text.
  5. Write a programme which performs addition, subtraction, multiplication of matrices. The dimensions of both the matrices would be specified by the user (dynamic memory allocation required). Use of structure or a class to define the matrix would be a good idea.
  6. Write a programme which will perform the job of moving the file from one location to another. The source and destination path will be entered by the user. Perform the required error checking and handle the exceptions accordingly.
  7. Create a sophisticated linked list class. You should be able to insert and delete nodes anywhere in the list, and the linked list should be (doubly linked)[https://en.wikipedia.org/wiki/Doubly_linked_list].
  8. Create a programme that implements a database. The fields are hard-coded, and the data is saved in a binary file. Although this isn't really flexibility, you aren't relying on any external libraries or functions.
  9. Create a command-line todo list. Users should be able to add, complete and delete items. Bonus: use a database (eg SQLite) to persist todo items between programme runs.

Expert

  • Write a programme which acted like a personal planner. A user can input an event, note things to-do on a certain date.
  1. Make a Markov chain generator. Read text from a source, create a histogram and allow different prefix lengths. See Think Python for info.
  2. Noughts and crosses game.
  3. Create a Youtube video downloader (actually really difficult cos Youtube tries to block everything)
  • Write a phone/address book programme, with persistent data. The users should be able to add/delete/change the data.
  • Write a simple payroll programme, that would include pay rates, and hours work for employees.
  • Write a card game, eg blackjack
  • Create a chess game.
  • Create a binary tree which has search and sorting functions.
  • Create a Quine, (a programme that prints out its own source code).
  • [C++] Implement your own strstr.
  • [C++] Implement your own version of the Standard Template Library.
  • Make a pokedex - use a database, enums for types/gender etc
  • Video format converter, eg .mov to .mp4 (ie frontend to ffmpeg)
  • URL shortener service

Graphics

  • Write a programme to draw a rectangle, ellipse, square, circle, point and line based on user input.
  • Create a paint programme. It should be possible to switch between different tools (circle, rectangle, eraser etc) using pre-defined key strokes.
  • Plot a simple x-y graph for a hardcoded function (e.g. y=cos(x)). It should be possible to zoom in on any part of the graph.
  • Write a programme to plot a graph of given equation of form y=f(x) and a range for x as command line arguments. (e.g. my_graph_plotter -eq="y=x*x" -xmin=-10, -xmax=10) (PS: more to do with equation solving than graphics)
  • Write the classic brick break-out game (Arkanoid/Breakout)

fuzzy search (levenstein) gui generative art

Good resources for Rust: