time and seq fixed

This commit is contained in:
Your Name 2023-12-22 22:51:42 +03:00
parent dfb806be4e
commit 7a64d6406b
2 changed files with 3 additions and 3 deletions

View File

@ -47,12 +47,12 @@ int main(int argc, char **argv) {
if (start <= last && n >= 0) {
for (double i = start; i <= last; i += n)
printf("%.*f\n", i);
printf("%.f\n", i);
}
else if (n <= 0)
for (double i = start; i >= last; i += n)
printf("%.*f\n", i);
printf("%.f\n", i);
return 0;
}

View File

@ -35,7 +35,7 @@ int main(int argc, char **argv) {
waitpid(pid, &status, 0);
/* Get time */
clock_t r2 = times(&t1);
clock_t r2 = times(&t2);
if (r2 == (clock_t)-1) {
fprintf(stderr, "time: %s\n", strerror(errno));
return 1;