Skip to content

Instantly share code, notes, and snippets.

@stringsn88keys
Created February 5, 2024 14:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save stringsn88keys/18ff0193a83b396e756f4d49f493f687 to your computer and use it in GitHub Desktop.
Save stringsn88keys/18ff0193a83b396e756f4d49f493f687 to your computer and use it in GitHub Desktop.
// Inspired by https://www.youtube.com/watch?v=MHBG_R_dhwk
#include <stdio.h>
int main() {
char input_line[80];
long line_count = 0;
while(!feof(stdin)) {
fgets(input_line, 80, stdin);
if(!feof(stdin)) line_count++;
}
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment