#include <stdio.h>

/* This program prints hello Wrold in the output
*/

int main()
{
	printf("Hello World.\n");
}



#include <stdio.h>

/* Compute factorial using a function 
*/

int factorial(int n); 

int main()
{
	int N, fact;

        printf("Give integer number N:\n");
	scanf("%d", &N);

        fact = factorial(N); 
    
        printf("Factorial of %d, is N!= %d", N, fact);

        return; 
}


int factorial(int n)
{
	int i, p = 1;
	for (i = 1; i <= n; i++) p *= i;
	return p;
}



#include <stdio.h>

/* This program performs simple operation with characters
   (a) Copy input to output
   (b) Counts characters 
   (c) Counts lines 
*/

int main()
{
	int c;
	long nc, nl;

        c = getchar();
        nc = 0;
        nl = 0;
        while(c != EOF) {
            putchar(c);
            c = getchar();

            ++nc;
            printf("Number of all characters is: %d\n", nc);

            if (c=='\n') {
                ++nl;
                printf("Number of all lines is: %d\n", nl);
            }
        }

	return 0;
}


