- 1
https://code.sololearn.com/c6AI0e4R43ri/?ref=app Please check error!
3 ответов
+ 5
Talha Aquil ,
since your post doesn't seem to be a question one could assume that you are asking if someone writes this code for you. we are not going to do this task for you. but we are very pleased to support you, so that you are able to solve this task by yourself.
if you really have a problem, we need some more details from you:
▪︎give a clear and complete description about your task
▪︎if there are error messages please post them here
▪︎give at least one sample with input data and the expected output
▪︎to be able to find out the issues you have, we need to see your code
=> please put your code in playground, save it there and post a link to it here.
thanks for your understanding!
+ 1
https://code.sololearn.com/c6AI0e4R43ri/?ref=app
Please check error!
0
public class Program {
public static void main(String[] args) {
int count = 30;
for (int i=1; i<=count; i++){
System.out.print( fib(i) +", " );
}
}
static int fib( int i) {
if (i==1)
return 0;
if (i==2)
return 1;
else
return fib(i-1) +fib(i-2);
}
}