just wondering if anyone can help with fixing the bugs in this prog... cant seem to fix them.
Code:
#include <stdio.h>
#include "put_row.h"
int main (int argc, char* argv[]) {
int start = 10;
int stop = 0;
int step = 1;
int c;
if (argc > 1) {
start = atoi(argv[1]);
}
if (argc > 2) {
stop = atoi(argv[2]);
}
if (argc > 3) {
step = atoi(argv[3]);
}
for (c = start; c > stop; c -= step) {
put_row(c, step, stop);
putchar('\n');
}
return 0;
Code:
#include <stdio.h>
#include "put_row.h"
void put_row(int start, int stop, int step) {
int c;
for (c = start; c != stop; c--) {
printf("%d ", c);
}
}
Code:
void put_row(int start, int stop, int step);