NevLabs

Under Construction

Thursday, July 28, 2011

Sum of elements of a matrix

#include<stdio.h> void main(...

Display whole numbers upto a given number

#include<stdio.h> void main() { int i,num=0,n; clrscr(); printf("Enter the limit : upto "); scanf("%d",&n); for(i=0;i<n;i++)  {  num+=1;  printf("%d\t",num);  } getch(); }...

Display whole numbers between two given numbers

#include<stdio.h> void main() { int i,j,num,k,initial; clrscr(); printf("Enter the limit :  "); scanf("%d%d",&j,&k); if(j>k) { num=j-k; initial=k; } else { num=k-j; initial=...

Whole numbers from 100 to 2

#include<stdio.h> void main...

Volume of a box

#include<stdio.h> void main...

Find the Area, Perimeter of a rectangle

#include<stdio.h> void main...

Prime Number

#include<stdio.h> void main...

Palindrome Number

#include<stdio.h> void main...

Display odd numbers upto a given number and display their sum and average

#include<stdio.h> void main...

Check whether the number is multiple of 5

#include<stdio.h> void main...

Largest among 3 numbers

#include<stdio.h> void main() { int big,num1,num2,num3; clrscr(); printf("Enter 3 numbers to find largest : "); scanf("%d%d%d",&num1,&num2,&num3); /* Use of conditional statement    expn1?expn2:expn3;           */ big=(num1>num2)?((num1>num3)?num1:num3):((num2>num3)?num2:num3); printf("big is %d",big); getch(); }...

Fibonacci series

#include<stdio.h> void main...

Display an integer is Even or Odd

#include<stdio.h> void main...

Even numbers upto a given number

#include<stdio.h> void main...

Program to print even numbers from 2 to 100

#include<stdio.h> void main...

Distance Travelled

#include<stdio.h> void main...

Cube,square,square_root of a given Number

#include<stdio.h> #include<math.h>void main...

Calculating circumstance and area of a circle

#include<stdio.h> #define pi 3....

Armstrong Number

#include<stdio.h> #include<math.h> void main() { int num,dup,rem,sum=0; clrscr(); printf("Enter a number : "); scanf("%d",&num); dup=num; while(num>0) { rem=num%10; sum+=pow(rem,3); num/=10; ...