0 like 0 dislike
5.7k views
Show more...
[Exercise] Coding (C) - asked in Chapter 9: Functions by (5.2k points)
ID: 34912 - Available when: 2017-12-14 18:00 - Due to: Unlimited

edited by | 5.7k views

46 Answers

0 like 0 dislike
Hidden content!
#include ***** * ** ***
int main()
{
**** *** *** * fib[100];
** *** * ** * a,n;
**** ** * *** ***** **** ** ***
* * * * *** *
* **** * * **** * *
** * * ** * *** * ** *
  {
* * ***** * * ** ** * * * * * * * ******* * *

*** * * ** * * * ** ***
** * * * ** * ** *
return 0;
}
answered by (-32 points)
0 0
prog.c: In function 'main':
prog.c:14:10: warning: format '%d' expects argument of type 'int', but argument 2 has type 'long int' [-Wformat=]
 printf("%d",fib[a]);
          ^
0 0
Case 0: Correct output
Case 1: Correct output
Case 2: Correct output
Case 3: Correct output
0 like 0 dislike
Hidden content!
#include<stdio.h>
int main()
{
*** ** * * ** ** * counter,fibonacci[100]={1},range,a;
    // Input
* ** *** ***** * **** *** * ** * *** * * * *
* * * *** ***** * ** * * * * * * * **
    {
* * ** *** * * * **** * ** *** * ** * ***** ** First two numbers
* * * * * * * ***** ** * * *** ** ***** * * * ******
* ** *** * * * ** * ** ** * * ** ** *
** *** *** * * * * * ** **** ** ** *** *** * ** *** * **** ** ** * *
***** * * ****** * ** ** ** * *** * * * * ***
*** * **** *** *** * *** **** **** Other numbers
*** *** * * ** * ***** * * * * ** * * *
* ** * ** * * * * * * ** ** ** * *** ** ** ****
***** * * * * ***** * * ** * * * ** ** * *** ** * **** * ** ** ****** **** * *** - 1] + fibonacci[counter - 2];
** **** *** **** ** ** * * * * ** *** * * *
* * ** ****** *** **** ** ***** * * * Required number
* * ** * ** **** * * * * *** * ** ** ** *** * **
    }
    // Output
* ** *** * * ***** *** ** *** *** *** **
* * * ** *** * **** *** 0;
}
answered by (-323 points)
0 0
Case 0: Correct output
Case 1: Correct output
Case 2: Correct output
Case 3: Correct output
0 like 0 dislike
Hidden content!
#include <stdio.h>
int main()
{
**** ** ** * ** ** * a[100];
** * * * *** * * *** ** * z,x,c;
*** *** ***** * ** *
* ** * * * * ** **** *
* * ** *** * * ** ** * *** * *
* ** * * ** * * * ** (x=2;x<=z;x++)
* *** * * * * ** * *
* * * **** ** *** * * ** * * * ** ** *** ***** ****
** * * ** * * * **** * * * * ******* * *
    }
* ** *** * ** * * * ********* * ** *
*** ** * ** * * * 0;
}
answered by (-229 points)
0 0
Case 0: Correct output
Case 1: Correct output
Case 2: Correct output
Case 3: Correct output
0 like 0 dislike
Hidden content!
#include <stdio.h>
int main()
{
** * ** ** * * ** * * a[13]={};
***** ** ** **** ** i=0,n;
** * ** ******** *** * **** * *** * *
* *** ****** * * * ***
*** ** *** ** *** * ****
** ******* *** ** *** ** ** *
** ** * * ** ** ** * ** * * * **** * ** *** *** ** ***
    }
** * * ** * * * * * if(n>1&&n<13){
* * ** * * * ** ** * * *** * * * ***
* * ***** ** ** *** **** * * **** * * * * * * * *** * * * ** ** * ****
* * * ** * * ** * * * * ** ** * ** ***** *
* ****** *** ** ** * * *** ** ** ** * * * * ** *** * ****** * *
    }
}
answered by (-329 points)
edited by
0 0
Case 0: Correct output
Case 1: Correct output
Case 2: Correct output
Case 3: Correct output
0 0
Case 0: Wrong output
Case 1: Correct output
Case 2: Correct output
Case 3: Wrong output
0 like 0 dislike
Hidden content!
#include<stdio.h>

int fib(int n){
  if(n==0)
* * * *** *** **** ******* 0;
  if(n==1)
* **** *** ** * 1;
**** *** * ******* *
}


int main(){
    int input=1,i;
** * * * * * ** ** * * * * * ** ** != 0){
** * **** * * * **** * *** **** * ** * ** * * **** &input);
*** * **** **** * **** *** * ** * *** ** *
** * * * ** * * ** * * * * * ** * **** **** * * ** * *** ** *
***** * **** * * ******* * * ** ** * * *** * ** **
**** * * ** * * ****** * * *** * *** * ** ** *** ** ** *** * * ** cannot less than 0\n\n");
* **** ** * * * ****** * * ** * * *
*** * * * ** * * * * * ** * * * ** * ***
* ** *** ** ** * * *** * * ** * ***** ** * * ** *** * * * * ** *
*** ** * * * **** * ** * *** **** *** ** * * * *** * ** ** ****** *
*** *** ***** * ** * * * ** ** *** *** *
*** ** ** **** *** ** * ***** * ** ** ***** 0;
   }
}
answered by (-32 points)
edited by
0 0
prog.c: In function 'main':
prog.c:30:9: warning: implicit declaration of function 'system' [-Wimplicit-function-declaration]
         system("PAUSE");
         ^~~~~~
0 0
Case 0: Wrong output
Case 1: Wrong output
Case 2: Wrong output
Case 3: Wrong output
0 0
Case 0: Correct output
Case 1: Correct output
Case 2: Correct output
Case 3: Correct output
0 like 0 dislike
Hidden content!
#include<stdio.h>
int main(void)
{
* * * * *** ** *** ** F0,F1,i,N,A;
** * ******* * **** ** ** ** ** * * * * * *


* * *********** * ** * F[N];
* *** *** * ** **
*** * **** *** * *** *

* ** *** ** * ******** ** * * * ******
* * ** * **** * *
* * *** * * *** ** * * ** * * * ** * ** ** **
*** * * ** ***** *** * * ******* * **** ** * ***
    }
** * * * * * ***** *** *
    {
** * ** ** *** *** ** ** ** * * * ***** * *** * * ****** *
*** ** *** *** **
** * * ****** ** ** * * * if(N==1)
** ** * * * * * * *
* * * ** ***** * ** ** * * **** * * * ** **** ** **** *
*** **** *** ** * ****


******* *** * ** * **** * ***
* * * ** * ******* **
*** * ** * ******** ** ** ** * * ** * ** * * ** **** * * * * *
    }



return 0;
}
answered by (-249 points)
0 0
Case 0: Correct output
Case 1: Correct output
Case 2: Correct output
Case 3: Correct output
0 like 0 dislike
Hidden content!
#include <stdio.h>
int main()
{
* * * * **** * * * * * n,i;
* * **** ** * **** * a[100]={0,1};
** ** * *** ** ** *** *** * * **** * **
* * * * *** * * * * *** *
** ** * * *** * *
* ** ** * * * * * * * * * * *** ** * * **** * ** *
    }
** ** *** *** * *** * ** * * * ** **** *
** * ** ** ** * * * * ** 0;
}
answered by (-196 points)
0 0
Case 0: Correct output
Case 1: Correct output
Case 2: Correct output
Case 3: Correct output
0 like 0 dislike
Hidden content!
#include * * ** ** * ***

int main()
{
* *** * * ** * ** n, i;
* * * *** * ** * int Fn[100];
******* * * * * * *** ** * * ** ***
* * *** *
** * * *** * *

* * ** * ****** * ****
** ** * * ** *
* ** ** * ** = Fn[i-1] + Fn[i-2];

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



** **** ** 0;
* ** *
answered by (-304 points)
0 0
Case 0: Correct output
Case 1: Correct output
Case 2: Correct output
Case 3: Correct output
0 like 0 dislike
Hidden content!
#include<stdio.h>
int main()
{
* *** ** * ** * *** *** ** ** ** ** * ** *
******** ** * * * ** * *** ** i;
* ** ** * ** * * * * * * * *** * ** ** **
* * **** *** * *** *** * * *** **** * *
**** ***** * * ***** 0;
}
answered by (54 points)
0 0
Case 0: Correct output
Case 1: Correct output
Case 2: Correct output
Case 3: Correct output
0 0
Case 0: Correct output
Case 1: Correct output
Case 2: Correct output
Case 3: Correct output
0 0
-----------Re-judge-----------
Case 0: Wrong output
Case 1: Correct output
Case 2: Correct output
Case 3: Wrong output
0 like 0 dislike
Hidden content!
#include <stdio.h>

int main()
{
* *** ** *** * * ** * * * ** ** *
* * **** * * *** * * b;
*** * * * * * * ** **** * * *** ****
*** ** * *** * * * ** ************ ** * ** * * ***** *
* ** * * ** ******* * 0;
}
answered by (-498 points)
0 0
Case 0: Correct output
Case 1: Correct output
Case 2: Correct output
Case 3: Correct output
0 0
-----------Re-judge-----------
Case 0: Wrong output
Case 1: Correct output
Case 2: Correct output
Case 3: Wrong output
Welcome to Peer-Interaction Programming Learning System (PIPLS) LTLab, National DongHwa University
English 中文 Tiếng Việt
IP:172.70.127.92
©2016-2025

Related questions

0 like 0 dislike
41 answers
[Exercise] Coding (C) - asked Dec 14, 2017 in Chapter 9: Functions by semicolon (5.2k points)
ID: 37370 - Available when: 2017-12-14 18:00 - Due to: Unlimited
| 4.6k views
0 like 0 dislike
93 answers
[Exercise] Coding (C) - asked Nov 2, 2017 in Chapter 6: Loops by semicolon (5.2k points)
ID: 29830 - Available when: 2017-11-02 18:00 - Due to: Unlimited
| 9.2k views
0 like 0 dislike
55 answers
[Exercise] Coding (C) - asked Nov 29, 2017 in Chapter 8: Arrays by semicolon (5.2k points)
ID: 34968 - Available when: 2017-11-30 18:00 - Due to: Unlimited
| 7.1k views
0 like 0 dislike
56 answers
[Exercise] Coding (C) - asked Nov 29, 2017 in Chapter 8: Arrays by semicolon (5.2k points)
ID: 34913 - Available when: 2017-11-30 18:00 - Due to: Unlimited
| 6.5k views
0 like 0 dislike
47 answers
[Exercise] Coding (C) - asked Dec 7, 2017 in Chapter 9: Functions by semicolon (5.2k points)
ID: 35785 - Available when: 2017-12-07 18:00 - Due to: Unlimited
| 4.9k views
12,783 questions
183,442 answers
172,219 comments
4,824 users