Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Project 3 Part 1 v1.7
//gcc 5.4.0 #include <stdio.h> #include <stdlib.h> //Start Program //int n //int i //int f [0,1] //READ n //for(i=0;i<=n;i++){ // if(i%2==0) // f1=f1+f2; // printf("%d,",f1) // } //// if(i%2!==0){ // f2=f1+f2; // printf("%d,",f2); // } //} //End Program int main(void) { int n; int i; int f1=0; int f2=1; scanf("%d",&n); for(i=0;i<=n;i++){ if(x<0&&i%2==0) f1=f1+f2; printf("%d",f1); continue; else if(x<0&&i%2!=0) f2=f1+f2; printf("%d",f1); continue; else if(i==0) printf("0,"); else if(i%2==0){ f1=f1+f2; printf("%d,",f1); continue; } else if(i%2!=0){ f2=f1+f2; printf("%d,",f2); continue; } } }
run
|
edit
|
history
|
help
0
BST
muuchas funciones utiles
FUNCTIONS Shape functions
h
CO_assign_q4
PREGUNTA 10 CADENAS
Lab 9 v1
linkedlist
intro coding hello world
Sumit