Skip to content

Latest commit

 

History

History

0x02-functions_nested_loops

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

0x02. C - Functions, nested loops

About

An introductory project on:

  • nested loops and how to use them
  • functions and how to you use them
  • What the is difference between a declaration and a definition of a function
  • What a prototype is
  • 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-holberton.c - prints Holberton, followed by a new line.

1-alphabet.c - function that prints the alphabet, in lowercase, followed by a new line.

2-print_alphabet_x10.c - function that prints 10 times the alphabet, in lowercase, followed by a new line.

3-islower.c - function that checks for lowercase character.

4-isalpha.c - function that checks for alphabetic character.

5-sign.c - function that prints the sign of a number.

6-abs.c - function that computes the absolute value of an integer.

7-print_last_digit.c - function that prints the last digit of a number.

8-24_hours.c - function that prints every minute of the day, starting from 00:00 to 23:59.

9-times_table.c - function that prints the 9 times table, starting with 0.

10-add.c - function that adds two integers and returns the result.

11-print_to_98.c - function that prints all natural numbers from n to 98, separated by a comma, followed by a new line.

Advanced

100-times_table.c - function that prints the n times table, starting with 0, if 0 <= n <= 15.

101-natural.c - computes and prints the sum of all the multiples of 3 or 5 below 1024 (excluded), followed by a new line. Allowed to use the standard library.

102-fibonacci.c - prints the first 50 Fibonacci numbers, starting with 1 and 2, separated by comma, followed by a new line. Allowed to use the standard library.

103-fibonacci.c - finds and prints the sum of the even-valued terms in the Fibonacci sequence whose values do not exceed 4,000,000, followed by a new line. Allowed to use the standard library.

104-fibonacci.c - finds and prints the first 98 Fibonacci numbers, starting with 1 and 2, followed by a new line. Allowed to use the standard library.