Skip to content

Latest commit

 

History

History

0x03-more_functions_nested_loops

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

0x03. C - More functions, more nested loops

About

An introductory project on:

  • nested loops and how to use them
  • functions and how to use them
  • the difference between a declaration and a definition of a function
  • prototypes
  • scope of variables
  • header files and how to to use them with #include

Requirements

  • Ubuntu 14.04
  • gcc 4.8.4
  • no standard library functions
  • allowed to use putchar

File Descriptions

Mandatory

0-isupper.c - function that checks for uppercase character.

1-isdigit.c - function that checks for a digit (0 through 9).

2-mul.c - function that multiplies two integers.

3-print_numbers.c - function that prints the numbers, from 0 to 9, followed by a new line.

4-print_most_numbers.c - function that prints the numbers, from 0 to 9, except 2 and 4, followed by a new line.

5-more_numbers.c - function that prints the numbers, from 0 to 14, followed by a new line 10 times.

6-print_line.c - function that draws a straight line of length n in the terminal, followed by a new line.

7-print_diagonal.c - function that draws a diagonal line of length n in the terminal.

8-print_square.c - function that prints a square of size n, followed by a new line.

9-fizz_buzz.c - prints the numbers from 1 to 100, separated by a space, followed by a new line. For multiples of three print Fizz instead of the number. For the multiples of five print Buzz. For numbers which are multiples of both three and five print FizzBuzz.

10-print_triangle.c - function that prints a triangle of size n, followed by a new line.

Advanced

100-prime_factor.c - finds and prints the largest prime factor of the number 612852475143, followed by a new line.

101-print_number.c - function that prints an integer.