#include int* fib(int); int main() { int count; std::cout<<\"enter number up to which fibonacci series is to be printed\"<
Your i is not initialized. Instead of making it i = 0, you do i < 0. And in the j loop, the maximum number should be d. So j < d. Not j <= d.