Skip to content

C (programming language) programmes I wrote when I was learning it. Please see README.md for task descriptions.

License

Notifications You must be signed in to change notification settings

maxkonrad/intro-to-c

Repository files navigation

iyte-ee103

C (programming language) programmes I wrote when I was learning C Programming Language for the course EE103 at IYTE.

IMPORTANT First try to make these projects listed below on your own. This repo includes my solutions. When doing so, try to not use a header file/library that provides ready-made code other than <stdio.h>.

Beginner Projects

  • ASCII Printer
    • Write a program that prints ASCII characters of English alphabet both in upper and lower case.
  • Even or Odd Checker
    • Write a program that takes an input prompt on terminal from the user and prints if it is even or odd.
  • Guess the Number
    • Write a program that wants user to pick a number from 1 to 100 and guessing it by asking if it is higher or lower than mid value of the interval.
  • Fibonacci Seq.
    • Write a program that prints numbers of fibonacci sequence in a random dedicated number of terms (if you love your computer don't make it too high). Try finding different methods to write this program.
  • Pascal Triangle
    • Write a program that prints elements of pascal triangle. Don't deal with justifying the indentation.
  • Chess Board
    • Write a program that prints a chess board in terminal. Try to make it in a scale that is prompted by user.

Intermediate projects

These are the tasks covered in lectures.

  1. A program that takes 3 exam scores from the user and prints values such as total score, mean value and letter grade (make sure that the mean value gives float output)
  2. Try to calculate the approximate value of the sine function using the Taylor series (a notation in mathematics) by taking input in radians without using math.h (if your machine is windows and you are using DEV C++, you will have naming problems for the sine function, you can use the name sinfu for this. If you love your computer, don't go further than 15 items in taylor series.)
  3. Write a program that calculates the y value of a polynomial for any x value
  4. Write 5 random room temperatures (float), print these room temperatures in order, then print the lowest value, then print the lowest value out of it, then print the worst value out of it, then print the array in reverse order with the worst value removed
  5. Draw a hollow square with a for loop
  6. Try to make an XOX game
  7. Caesar encryption, ask the user what they want, encrypt and decrypt. (See NOTE-1)
  8. Try to combine two strings using a pointer. (See NOTE-1)

For further

  • Try writing a program that draws left pyramid using single loop.
  • Try writing buble sort algorithm.
  • Try writing binary search algorithm.
  • Try measuring time elapsed in the execution process of any code using <time.h> built-in library.

Important Again Use Google in need.

NOTE-1: I couldn't find intermediate-7 (encryption and decryption) and intermediate-8 (pointers) in my computer. I will upload them if I can find.

NOTE-2: You might need to change the main function's return type to int with respect to your local environment needs. (gcc or clang versions)