faire-tant-que
This commit is contained in:
parent
6b74662521
commit
5c568568a6
1 changed files with 18 additions and 0 deletions
18
semaine-2/faire-tant-que/main.c
Normal file
18
semaine-2/faire-tant-que/main.c
Normal file
|
@ -0,0 +1,18 @@
|
|||
#include <stdio.h>
|
||||
|
||||
#define MULTIPLICAND 9
|
||||
#define TARGET 7101
|
||||
|
||||
int main(void) {
|
||||
|
||||
int i = 0, result;
|
||||
|
||||
do {
|
||||
result = MULTIPLICAND * i;
|
||||
i++;
|
||||
} while (result < TARGET);
|
||||
|
||||
printf("%i", i - 1);
|
||||
|
||||
return 0;
|
||||
}
|
Loading…
Add table
Reference in a new issue