Compare commits

...

2 commits

Author SHA1 Message Date
Théo
02e205ab3e for-punition 2023-09-28 17:45:33 +02:00
Théo
5c568568a6 faire-tant-que 2023-09-28 17:41:17 +02:00
2 changed files with 33 additions and 0 deletions

View 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;
}

View file

@ -0,0 +1,15 @@
#include <stdio.h>
#define MULTIPLICAND 7
#define TARGET 100
int main(void) {
int i;
for (i = 1; i <= TARGET; i++) {
printf("%03i x %i = %03i\n", i, MULTIPLICAND, i * MULTIPLICAND);
}
return 0;
}