You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Ask the user for the number of terms
printf("Enter the number of terms: ");
scanf("%d", &n);
// Print the first two terms
printf("Fibonacci Series: %d, %d", t1, t2);
// Loop to generate the rest of the Fibonacci series
for (int i = 3; i <= n; i++) {
nextTerm = t1 + t2; // Calculate the next term
printf(", %d", nextTerm); // Print the next term
t1 = t2; // Update the terms
t2 = nextTerm;
}
printf("\n"); // Newline at the end
return 0;
}
Expected behavior
to print : Enter the number of terms:
Actual behavior
Exception:
System.ArgumentOutOfRangeException: The value must be greater than or equal to zero and less than the console's buffer size in that dimension.
Parameter name: left
The text was updated successfully, but these errors were encountered:
@Umugisha01, you were using a pretty old version of PSReadLine (2.0.0-beta2 or prior), and it's likely that the issue was fixed in a newer version.
Please upgrade to the 2.3.5 version of PSReadLine from PowerShell Gallery.
See the upgrading section for instructions. Please let us know if you run into the same issue with the latest version.
Prerequisites
Exception report
Screenshot
Environment data
Steps to reproduce
#include <stdio.h>
int main() {
int n, t1 = 0, t2 = 1, nextTerm;
}
Expected behavior
to print : Enter the number of terms:
Actual behavior
Exception:
System.ArgumentOutOfRangeException: The value must be greater than or equal to zero and less than the console's buffer size in that dimension.
Parameter name: left
The text was updated successfully, but these errors were encountered: