Skip to content

vibulans2000/c-programming-exercises

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

c-programming-exercises

My learning assignments

Day1

  1. add two numbers and print result. (solution)
  2. multiply two numbers and print result. (solution)
  3. divide the given number a with another number b and print resultant decimal number. (solution)
  4. print the remainder of a/b. (solution)
  5. add the following numbers and print result. 8,7,19,25,1. (solution)

Day2

  1. find the area of given square with side a. ( solution )
  2. Farmer Gopal owns a triangular field with height h and base b. he wants to store rice grains in the field.find how much maximum grains he can store in the field. (solution )
  3. John and his dog goes for a walk around a park. Their path follows a circular route around the park. The center of the park is 49 meters from one of the gates at the circular path. They made 6 rounds. Find how much meter they both walked on that day. ( solution )
  4. find the square root of given number ( solution )

Day3

  1. Print if given number is even/odd. ( solution )
  2. Find the greatest of given two numbers. ( solution )
  3. A candy store owner decided to offer free chocolates to kids. He plans to give chocolates based on kid's shirt size as per table below. Write a program to print the number of chocolates to kid gets given his shirt size. (solution)
shirt size no. of chocolates
XS 18
S 9
M 4
L 2
XL 1
  1. Find the smallest of three integers (solution)

Day4

  1. list all odd numbers from 50 to 100. (solution, solution using mod)
  2. print sum of integers from 1 to 50. (solution)

Day5

  1. print all factors of given number. (solution)
  2. print if given number is prime or not. (solution, solution using break)
  3. print the following pattern. (solution)
*
**
***
****

Day6

About

My learning exercises in C Programming. I'm 13 years old!

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages