Archives
Trending
Support
Login
clear text
XML
Django
JavaScript
MATLAB
C
C++
C#
Python
SQL
Shell
Bash
Markdown
YAML
JSON
HTML
CSS
PHP
Java
Ruby
Go
Rust
Swift
Kotlin
Arduino
TypeScript
Perl
Autohotkey
Lua
SQF
R
Scala
Haskell
Groovy
Dart
Clojure
VB.NET
Objective-C
PowerShell
Bash
CoffeeScript
Verilog
#include
#include
#include
int main(int argc, const char * argv[]) { if(argc < 3) { printf("Vlezna datoteka i izlezna treba da se vnesat kako argument\n"); return 0; } FILE *in = fopen(argv[1], "r"); FILE * out = fopen(argv[2], "w"); if(in == NULL) { printf("Fajlot ne postoi\n"); return 0; } if(out == NULL) { printf("Fajlot ne postoin\n"); return 0; } char s[1000]; int a, b, c; int brojac = 0; while(fscanf(in, "%s%d%d%d", s, &a, &b, &c) != EOF) { int prosek = (a + b + c) / 3; if(prosek < 10) { fprintf(out, "%s %d\n", s, prosek); brojac++; } } fprintf(out, "%d\n", brojac); return 0; }
Mark as private (unlisted)
for 30 minutes
for 6 hours
for 1 day
for 1 week
for 1 month
for 1 year
everlasting (like CCCP)