0 like 0 dislike
4.3k views
Show more...
[Exercise] Coding (C) - asked in C
ID: 22018 - Available when: Unlimited - Due to: Unlimited

edited by | 4.3k views

69 Answers

0 like 0 dislike
Hidden content!
* *** * * * ***



int ** (int month)



{

if (month == 0)

{
*** * **** * * ** ** * 0;

}

else if (month == 1)

{
** ** * * ** * ** * 1;

}

else

{
* * **** *** ****** ** * * ** ** (month - 1) + ** (month - 2));

}

}





int main ()

{
** ***** ** * * * ****** * * **** ** * * = 1, ** ** ** = 0;
* ** * * ***** ** ** * * * *** ** ** *
* **** * * ***** * ***
** * * ** * * = ***** * *
* * ** **** (c ** (month - 1))

{
** * * ***** * ** * * * * = ** ** + ** *** * *


** * * * ** * ** * **** **** = * *** *
* *** *** ********* * ** *** * ** * * * = ** * *
* ** *** ** ** *** ** *** ** ** * **** *** * = x;


** * * * ** *** ***** * *

}
** ** * ** * * ***** **
* **** * *
**** * * * 0;

}
answered by (-34 points)
0 like 0 dislike
Hidden content!
* * ***** ** *



int **** (int month)



{

if (month == 0)

{
* ** * * * * * ** * *** * 0;

}

else if *** == 1)

{
** ** *** * **** * * ** * 1;

}

else

{
* * *** * * * **** * *** * * (month - 1) + * * (month - 2));

}

}





int main ()

{
** ***** * *** * *** * * * * ** *** *** = 1, ** *** ** = 0;
* * ** *** * * * *** ** ** *
** ** ******* = ** ** *
* * * * * * * (c * * (month - 1))

{
**** * ****** ***** * * * ** *** * **** = *** **** + **** *


* *** * *** * ** * *** * ** = *** * *
** ** * * * **** * *** ** * * ** * * = *
** * * ** * ** * * ** * * ** ** = x;


*** * ** * * ** * ** * **

}
***** ** * * *** * **
*** ** ** **** 0;

}
answered by (-34 points)
0 like 0 dislike
Hidden content!
#include<stdio.h>

#include<stdlib.h>



int main(){
*** * * * * * * * a[90];
** * * **** ** *** * ** p;
* * * * * *** ***** * ***** * * **
* *** * ** *** ***** *** * ** ** * ** * * = 0;
** ** ** * * *** *******
** * *** ** * **** * = 1;
*** * ** *** ** ** * * = 1;
** * ** * **** ** * **** i;
** * * ** *** * * **** * **
* *** * * * * * **** * ** *** *** * * ** *** * * * = a[i-2] + a[i-1];

    }
****** ** * * *** ******** * * * input;
* *** ** * ** **** * **** * ** *
* * * * * * * * ****** * *** *** * ** *** *
** *** * **** * ** ** 0;

}
answered by (-134 points)
0 like 0 dislike
Hidden content!
#include<stdio.h>

#include<stdlib.h>



int main(){
* ** * * ** ** * ***** a[100];
* ** ** * * * p;
* *** * * ** * * *** *
* * *** *** * * *** ** ** * ** * * **** * ** = 0;
* ******** ** * ** ** *
** ******* **** *** * ** = 1;
* * * ** *** **** * * * * = 1;
* * *** ** * *** *** i;
* **** ** ** * **** ******* * ***
** * ***** * *** ** **** ** * ***** *** * = a[i-2] + a[i-1];

    }
*** * * ** * * *** * ** input;
** ** * * * * ** ** * ** * * ** *** * ***
* ** * ** * ** * * * * * * ** ***
* *** ** ** * ** **** ** **
* ** *** * *** *** 0;

}
answered by (-134 points)
0 like 0 dislike
Hidden content!
** * * * ** *



int ** (int month)



{

if (month == 0)

{
* * ** *** *** ***** 0;

}

else if * * == 1)

{
** ** * *** ** ******* 1;

}

else

{
* ** * * ** ** * * (month - 1) + ** (month - 2));

}

}





int main ()

{
* ** * * * * ** * *** * *** = 1, ** ** = 0;
** * **** ** * * * ** * *** **
* * * **** ** ** = ** ** ****
* * ** * * **** (c * * (month - 1))

{
* *** * * * **** *** ** *** * * = **** + ** * **


* * *** ** ** * ** ****** * ** = ******
* ** ********* * **** * ** **** *** * = ** *
* *** * ** ** * ** * * ** * **** = x;


* * **** ** ** * ** * * ** **** *** *

}
** ** ******* ** ** *
***** *** * * ** 0;

}
answered by (-34 points)
0 like 0 dislike
Hidden content!
#include <stdio.h>

#include<stdlib.h>

int main()

{
* ** * ***** ** * * ** * * n,i;
* ** ** ** * ** long a[100]={};
*** * ** * ** * ** ** * * * * * ** *** **
* ******** * * * * * *** * * * **
** ***** * * * * * * **
* * ***** ** ** *** **
*** **** * **** * *** * ** **** * ** **** ******** *
** * * * ****** ** ***
* * * * ** * * **** *** ******* ** ***
* ** * * ** * * ** ** * 0;

}
answered by (-249 points)
0 like 0 dislike
Hidden content!
#include<stdio.h>



int main(void)

{
** ** * * * ** * * * ** long long int a[90];
** ** * ** *** * * * * b,i;
** * **** **** * ** * * * *** * * * **
* * ********** * * **** * * * * ** * ** * *** * ****
* ** **** **** ** * ** ** * **** ** * * **
** *** *** * * * **** ** * * * ** *

    {
******* * * * ** * * * * * ***** *** *** * * * ** * ***** **
*** ** **** * *** ***
* *** * *** **** * *** * * * ** * ** * *** ** ** ***

}
answered by (-412 points)
0 like 0 dislike
Hidden content!
#include <stdio.h>

#include<stdlib.h>

int main()

{
** ******* * * * ** n,i;
* * * ** *** ** * ** * * * long a;
*** * *** * * * ** ****** * * * * *** * *** * ** *
* ** * **** ** * * *** ** ** *
* * * ***** * * * ** ******
** ** ** ** * *
* ******** * ****** * ** *** * * * * ******* ** ****
** ****** ** * **
*** * * ***** * **** ** ** * * ** ** *
** * ** ** ****** ** ** 0;

}
answered by (-249 points)
0 like 0 dislike
Hidden content!
* *** **** ****



int * * (int month)



{

if (month == 0)

{
*** * * * * * ** ** * * * 0;

}

else if * * == 1)

{
* * **** ****** * *** 1;

}

else

{
*** * * * *** **** * ** * * (month - 1) + * ** (month - 2));

}

}





int main ()

{
* * *** ** * * * ** ** **** = 1, **** **** = 0;
** * * *** **** * * * * * **** * * *
* ** *** * ** ** = * * *
* **** * * * ** (c *** * (month - 1))

{
** ***** **** * *** *** *** ***** = ** * ** * + * ** *


* ** *** *** ** ****** *** *** **** * = * * *
* * ***** ** * * *** ** * *** * * = **
* * ***** * * * ** ** ** ** *** ** = x;


* * *** **** ** * ** **

}
* * * ** * * * **** ******
* ** *** **** ** ** 0;

}
answered by (-34 points)
0 like 0 dislike
Hidden content!
#include <stdio.h>

int fibo(int);



int main()

{
*** * ****** ** * * **** num, result;
* ** *** * ** * ****** * ** **** ** &num);
** * ** * **** * * *** (num < 1 || num > 90)
** * ** * * ** ** * * ** *** **** * ** ** ** * * * ** *** *
********* * *** *
*** ***** ** * * * ** ** ***** ** ** *** **** ** = fibo(num);
** *** ** ** ****** * * * *** **** * ** ** **** * **** *** * ** ** * * ** result);
* ***** **** *** ***
* *** * ** ** ****** 0;

}



int fibo(int num)

{
* ** ***** *** ** * (num == 0)
* * ** * ** * *** ** *** * * ** **** ***** * ** 0;
* * * ** *** **** ***** if (num == 1)
* * * * *** * * *** * * * * * ** *** 1;
* * *** * ** * * *** * *
*** ** * **** * ***** * * * * * * ***** ** * *** *** * - 1) + fibo(num - 2));

}
answered by (20 points)
Welcome to Peer-Interaction Programming Learning System (PIPLS) LTLab, National DongHwa University
English 中文 Tiếng Việt
IP:172.69.58.230
©2016-2025

Related questions

0 like 0 dislike
23 answers
[Exercise] Essay (Open question) - asked Mar 23, 2017 in C
ID: 23262 - Available when: Unlimited - Due to: Unlimited
| 2.1k views
0 like 0 dislike
52 answers
[Exercise] Coding (C) - asked Feb 23, 2017 in C
ID: 22017 - Available when: Unlimited - Due to: Unlimited
| 3.7k views
12,783 questions
183,442 answers
172,219 comments
4,824 users