Opening Ceremony

Bhim Higher Secondary School Suntopar, Dolakha

Sunday, July 31, 2016

Program in C for Traingle : Nested Loop

#include<stdio.h>#include<conio.h>void main(){    int i,j;    for(i=1;i<=5;i++)    {        for(j=1;j<=i;j++)        {            printf("%d",j);        }        printf("\n");    }    getch();}...

Program in C to find the factorial of a given number

/* Program to find the factorial of a given number */#include<stdio.h>#include<conio.h>void main(){    int i, num, fact = 1;  printf("\n Enter a number to calculate it's factorial : ");  scanf("%d", &num);  for (i = 1; i <= num; i++)    fact = fact * i;  printf(" Factorial of %d = %d\n", num, fact);  getch();} ...

Program in C to find sum, difference and product of 2 numbers using switch case statement

/* Program in C to find sum, difference and product of 2 numbers using switch case statement */#include<stdio.h>#include<conio.h>void main(){    int a,b,ch;    printf("\n Enter First Number :");    scanf("%d",&a);    printf("\n Enter Second Number :");    scanf("%d",&b);    printf("\n Enter Your Choice: ( 1. Sum:  2. Difference : ...

Fibonacci Series using while loop in C Programming

/* #include<stdio.h>#include<conio.h>void main(){    int a=2, b=2, c, i=1;    printf("\n %d ",a);    printf("%d ",b);    while(i<=10)    {        c=a+b;        printf("%d ",c);        a=b;        b=c;        i++;   ...

Program in C to display first 10 even numbers using while loop

/* Program in C to display first 10 even numbers */#include<stdio.h>#include<conio.h>void main(){    int a=2,i=1;    while(i<=10)    {        printf(" %d ",a);        a=a+2;        i++;    }    getch();} ...

Friday, July 29, 2016

Program in C to calculate wage according to given condition

/* A man is paid at the hourly rate of Rs 250 per hour for the first 30 hrs worked in a week. There after the overtime is paid at 1.5 times the hourly rate for the next 25 hrsand 2 times the hourly rate for further worked.WAP to input the number of hours worked in a week and print the weekly wages *//* Program to Enter 3 Numbers and Find the largest */#include<stdio.h>#include<conio.h>void main(){    int hour,wage;   ...

Tuesday, July 26, 2016

Program in C For Series 2,5,10,17 ...... upto nth term and sum too

/* Program in C For Series 2 5 10 17 ...... upto nth term and sum too */#include<stdio.h>#include<conio.h>void main(){    int i,calc=0,num=0,sum=0;    printf("\n Enter any number :");    scanf("%d",&num);    for(i=1;i<=num;i++)    {    calc=i*i+1;    printf(" %d ",calc);    sum=sum+calc;    }   ...

Program in C For Series 2 4 8 16...... upto nth term

/* Program in C For Series 2 4 8 16...... upto nth term */#include<stdio.h>#include<conio.h>void main(){    int a=2,i,num;    printf("\n Enter any number :");    scanf("%d",&num);    for(i=1;i<=num;i++)    {    printf(" %d ",a);    a=a*2;    }    getch();} ...

Friday, July 22, 2016

Fibonacci Series in C Programming

/* Program in C to print fibonacci series upto 10th term */#include<stdio.h>#include<conio.h>void main(){  int a=2,b=2,c,i;  printf(" %d ",a);  printf(" %d ",b);  for(i=1;i<=10;i++)  {      c=a+b;     printf("%d ",c);     a=b;     b=c;  }  getch();} ...