Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- int main() {
- int n;
- int product = 1;
- printf("Enter the number of terms:\n");
- scanf("%d", &n);
- printf("Printing the %d terms\n", n);
- for(int i = 1; i <=n; i++) {
- product = product * i;
- printf("%d", product);
- if(i < n) {
- printf("%c", ',');
- }
- }
- }
Add Comment
Please, Sign In to add comment