Students applying for admission to the Comenius University have to pass entrance exams. Exams for computer science were prepared by Andrew this year. Unfortunately Andrew went to a conference during the examinations and his colleagues have to grade the solutions. Andrew forgot to give them the model solutions and his colleagues found out that they are not able to solve one of the exam questions. Since they cannot contact Andrew to learn the correct answer to this question, they need your help.
Here is the question from the exam. Given is a program which takes no input, runs for a long time and occasionally writes the character * to the standard output. Determine how many stars the program outputs.
The input file contains the source code of the program from the exam written in both Pascal and C languages. You may assume that both versions of the program are syntactically correct, do not result in a run-time error and output the same number of stars.
The output file should contain the number of stars written by the program from the input file.
var i:integer; begin for i:=2 to 8 do write('*'); end. #include <stdio.h> void main() { int i; for(i=2; i<=8; i++) printf("*"); }Output file:
7