Cruz Castillo

Generation

generate functionSun, 14 May 2023

program to print the serie 0, 1, 1, 2, 3. 5, 8. 13, 21

int main() { char ch = 'y'; int x = 0, y = 1, z = 0; while (ch == 'y' || ch == 'Y') { cout << x; z = x + y; x = y; y = z; cout << ", "; cin >> ch; } return 0; }

Want to kickstart your project?Use the new AI Studio to create your code