#include
int main()
{
int i,sum=0;
for(i=1;i<=100;i++)
sum=sum+i;
printf("Sum
of first 100 natural number is %d\n",sum);
return(1);
}
#include<stdio.h>
main()
{
int count=0,i,j;
for(i=0;i<100;i++)
{
for(j=0;j<=i;j++)
if(i==j*j)
[
count++;
}
printf("\n The nno of perfect squares within 100 is %d",count);
}
}
#include<stdio.h>
int main()
{
int limit,num,sum=0,i;
printf("enter a number");
scanf("%d",&num);
for(i=0;i<=num;i++)
sum+=i;
printf("%d",sum);
return 0;
}
void main()
{
int i,num=1;
clrscr();
while(num<=100)
{ i=2; while(i<=num)
{ if(num%i==0)
break;
i++; }
if(i==num)
printf("\n%d is Prime",num);
num++;
}
getch();
}
int i;
for (i=1; i<=100; ++i) printf ("%d^2=%d\n", i, i*i);
main()
{
int num=100;
printf("The even numbers within 100 are");
while(num!=1)
{
num=num/2;
printf("%d\t",num);
}
}
#include <stdio.h>
int main (int argc, char **argv) {
int i;
for (i=1; i<100; i+=2) printf ("%d ", i);
}
To get all tutorials and example of"C Programming"
Reference:cprogramming-bd.com/c_page2.aspx# Prime number
#include
write a lex program to delete space from the program
1. Design an algorithm to compute sum of the squares of n numbers?
How to write a program for mouse in microprocessor?
To write a C++ program to display the student details using class and array of object.
#include
Squares of numbers from 13 to 15 inclusive
No.First of all, you can't write negative numbers as sums of perfect squares at all - since all perfect squares are positive.Second, for natural numbers (1, 2, 3...) you may need up to 4 perfect squares: http://en.wikipedia.org/wiki/Lagrange's_four-square_theoremNo.First of all, you can't write negative numbers as sums of perfect squares at all - since all perfect squares are positive.Second, for natural numbers (1, 2, 3...) you may need up to 4 perfect squares: http://en.wikipedia.org/wiki/Lagrange's_four-square_theoremNo.First of all, you can't write negative numbers as sums of perfect squares at all - since all perfect squares are positive.Second, for natural numbers (1, 2, 3...) you may need up to 4 perfect squares: http://en.wikipedia.org/wiki/Lagrange's_four-square_theoremNo.First of all, you can't write negative numbers as sums of perfect squares at all - since all perfect squares are positive.Second, for natural numbers (1, 2, 3...) you may need up to 4 perfect squares: http://en.wikipedia.org/wiki/Lagrange's_four-square_theorem
It is 180,001.
write a lex program to delete space from the program
write an assembly language program to find sum of N numbers
1. Design an algorithm to compute sum of the squares of n numbers?
write a shell program for finding out gcd of three given numbers? write a shell program for finding out gcd of three given numbers? write a shell program for finding out gcd of three given numbers? check bellow link http://bashscript.blogspot.com/2009/08/gcd-of-more-than-two-numbers.html
fdsgfhgdfhgdf
How to write a program for mouse in microprocessor?
program to find maximum of two numbers using pointers
write it in 8085