answersLogoWhite

0


Best Answer

#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);


}

User Avatar

Wiki User

11y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

11y ago

#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);

}

}

This answer is:
User Avatar

User Avatar

Wiki User

11y ago

#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;

}

This answer is:
User Avatar

User Avatar

Wiki User

11y ago

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();

}

This answer is:
User Avatar

User Avatar

Wiki User

15y ago

int i;

for (i=1; i<=100; ++i) printf ("%d^2=%d\n", i, i*i);

This answer is:
User Avatar

User Avatar

Wiki User

15y ago

main()

{

int num=100;

printf("The even numbers within 100 are");

while(num!=1)

{

num=num/2;

printf("%d\t",num);

}

}

This answer is:
User Avatar

User Avatar

Wiki User

12y ago

#include <stdio.h>

int main (int argc, char **argv) {

int i;

for (i=1; i<100; i+=2) printf ("%d ", i);

}

This answer is:
User Avatar

User Avatar

Wiki User

9y ago

To get all tutorials and example of"C Programming"

Reference:cprogramming-bd.com/c_page2.aspx# Prime number

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Write a c program to print squares of all numbers from 1 to 100 inclusive?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

Write a C Program to print sum of squares of odd numbers?

#include


Lara chooses a square number she rounds it to the nearest hundred her answer is 200 write all the possible square numbers Lara could have chosen?

Squares of numbers from 13 to 15 inclusive


Can you write every integer as the sum of two nonzero perfect squares?

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


What is the sum of the digits needed to write all the whole numbers from 0 to 10000 inclusive?

It is 180,001.


Write a program in Lex to eliminate white space and collect numbers as a token?

write a lex program to delete space from the program


How do you write an assembly language program to find the sum of n numbers using array?

write an assembly language program to find sum of N numbers


Write algorithm compute sum of square of N numbers?

1. Design an algorithm to compute sum of the squares of n numbers?


Shell program for 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? 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


How do you write a program in objective c numbers 1-100 prime numbers?

fdsgfhgdfhgdf


Could you Write a program for 8086 microprocessor that displays on the monitor the average of 2 numbers from an array?

How to write a program for mouse in microprocessor?


How to write a C program to find largest 2 numbers using pointers?

program to find maximum of two numbers using pointers


Write a program to add two 8 bit numbers in microprocessor 8051?

write it in 8085