#include <fstream>
#include <iostream>
#include <conio.h>
usingnamespace std;
int main()
{
ifstream fin("input.txt");
ofstream fout("output.txt");
int i;
char S[100];
//Reading the file
while(!fin.eof())
{
fin.getline(S, 100);
}
//Counting the lines of the file
int s=0; //initializing the sum
for(i=0; S[i]; i++)
{
if(S[i]=='\n') //everytime we meet the escape character
s++; // increment the sum
}
fout << s; // s=0, why?
//Displaying the lines in reverse order... any ideas?
}