We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
- Prepare
- C
- Functions
- Calculate the Nth term
- Discussions
Calculate the Nth term
Calculate the Nth term
Sort by
recency
|
820 Discussions
|
Please Login in order to post a comment
int find_nth_term(int n, int a, int b, int c) { int res = (a+b)+c; n += res; return (n);
} its execute success but other test scenarios failed. Why? Any idea
include
include
include
include
//Complete the following function.
int find_nth_term(int n, int a, int b, int c) { //Write your code here. int ret = 0; int d = 0;
}
int main() { int n, a, b, c;
}
include
int find_nth_term(int n, int a, int b, int c) { int sum[n],count; sum[0]=a,sum[1]=b,sum[2]=c; for(int i=3;i