Skip to main content

Generate all perfect nos. below 100.

PROCEDURE:-
      1.set n=1
      2.repeat steps 3 to 6 until n reaches 100 incrementing n by 1 each time 
      3.set sum to 0
      4.start finding modulo value for  n with i=1 to n-1 value incrementing i by 1 each time
      5.if at any point remainder is 0 add i to sum
      6.if sum is same as n then  print n

CODE:-

#include<stdio.h>
void main()
{
int n ,i,s;
printf(“the perfect numbers below 100 are \n”);
for(n=1;n<=100;n++)
{
s=0;
for(i=1;i<n;i++)
{
if (n % i = = 0)
   s=s+i;
}
if (n = = s)
printf(“%3d “,n);
}
}
Output:-6,28

Comments

Popular posts from this blog

Future Mouse-Evo Mouse

New evolution of the Mouse. In 1980's round ball mouses are invented, then technology introduced Optical mouses. Now upcoming Mouse is named as Evo mouse . No more movement of your hands on placing a physical mouse,   Your finger is the pointer . You can use this mouse on any Flat Surface and also it requires very little space. This mouse contains a Power button on the top, Mini USb port . It works with the help of bluetooth and input is taken by the sensor. View this Video to know the functionality of   EvoMouse

Hide your IP address with Proxy servers

The most common method to Hide your IP address is to use a PROXY server. Proxy server is a computer network service that provides an indirect connections between other computer networks. By using this proxy sites we can access any website with out revealing our IP address. This is the best method to keep your IP address secure. Here is the free proxy server website link.  http://www.freeproxyserver.ca/     We need to type the URL of such as (www.facebook.com) in the box given in the site, then we can browse it with out providing our IP address

Speed Up Your RAM

Speed up your RAM speed by using this technique... 1. Click  Start button Picture  of the Start button 2. Click  Control Panel 3. Choose  System and Maintenance  and then click  System . 4. In the left pane, click  Advanced system settings . 5.On the Advanced tab, under Performance, click  Settings . 6. Click the Advanced tab, and then, under Virtual memory, choose Change. 7. Click  Custom  to change the Initial size (MB) and Maximum size. See the hot tip above. Remember to choose the drive you would like to use to increase the virtual memory. In most cases it usually your C: Drive. You can set the initial size and maximum size after clicking the Custom size check box.Remember its better to keep the Virtual memory values the same. Also having enough available space is absolutely necessary for your virtual memory and RAM to function properly.  In Windows XP 1.Click Start, and then click  Control Pane...