27 lines
458 B
C
27 lines
458 B
C
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
int main(void) {
|
|
int i = 0;
|
|
int one = 0;
|
|
int two = 1;
|
|
int three = 1;
|
|
while(i<20){
|
|
if (i<2){
|
|
if (i == 0){
|
|
printf("u%d = 0\n", i);
|
|
}else{
|
|
printf("u%d = 1\n", i);
|
|
}
|
|
}else{
|
|
one = two + three;
|
|
printf("u%d = %d\n", i, one);
|
|
two = one + three;
|
|
printf("u%d = %d\n", i, two);
|
|
three = one + two;
|
|
printf("u%d = %d\n", i, three);
|
|
}
|
|
i++;
|
|
}
|
|
return EXIT_SUCCESS;
|
|
}
|
|
/*1 1 2 3 5 8 13 */ |