Skip to content

Commit 6629c09

Browse files
committed
2-largest_number.c
1 parent f596c9b commit 6629c09

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed

0x03-debugging/2-largest_number.c

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
* @c: third integer
88
* Return: largest number
99
*/
10+
1011
int largest_number(int a, int b, int c)
1112
{
1213
int largest;

0x03-debugging/2-main.c

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
#include <stdio.h>
2+
#include "main.h"
3+
4+
/**
5+
* main - prints the largest of 3 integers
6+
* Return: 0
7+
*/
8+
9+
int main(void)
10+
{
11+
int a, b, c;
12+
int largest;
13+
14+
a = 972;
15+
b = -98;
16+
c = 0;
17+
18+
largest = largest_number(a, b, c);
19+
20+
printf("%d is the largest number\n", largest);
21+
22+
return (0);
23+
}

0 commit comments

Comments
 (0)