Thursday 11 December 2014

Age Math Trick

Interesting Trick:

1. Multiply your age with 259
2. and then Multiply answer with 39.
now see the result, its amazing na?

Monday 18 August 2014

Stop window resizing in VLC media player.

Go to
1. Tools
2. Preferences or (ctrl+p)
3. Interface settings
and uncheck "resize interface to video size".


thank u..

Monday 11 August 2014

C language program to find out the factorial of an integer by calling a function.

#include<stdio.h>
void main()
{
          long int n;
          long int fact(long int n);
          clrscr();
          printf(" Enter a number: ");
          scanf("%ld",&n);
          printf(" Factorial of %ld is %ld",n,fact(n));
          getch();
}
long int fact(long int i)
{
          int fct=1;
          for(;i>=1;i--)
          fct*=i;
          return fct;

}

Wednesday 6 August 2014

C language program to find out the factorial of an integer by using "while" loop.

#include<stdio.h>
main()
{
          double n,ans=1;
          clrscr();
          printf(" Enter a number\n to find factorial of it : ");
          scanf("%lf",&n);
          while (n>1.)
          {
          ans*=n;
          --n;
          }
          printf(" answer = %.2lf",ans);
          getch();

}

C language program to find Prime Number.

#include<stdio.h>
#include<math.h>
void main()
{
          int num,i,is_prime=0;
          clrscr();
          printf(" Give a number : ");
          scanf("%d",&num);
          for (i=2;i<=sqrt(num);i++)
          {
          if (num%i==0)
          {
          is_prime=1;
          break;
          }
          }
          if (is_prime==1)
          printf(" Not prime number");
          else
          printf(" Prime number");
          getch();
}

Monday 4 August 2014

What is computer?

Computer:
            Computer is an electric device, which is used in almost all fields of life. Computer receives instruction or data through input devices. It works on these instructions in processor and provides meaningful results through output devices. A computer can be divided into three main units.
Input units:
            Such parts of computer through which a computer can receive data are called input units. E.g.: keyboard, mouse, microphone etc.
OR
The device from that a computer receives instructions is known as input device. Data in any form is first digitized, i.e. converted into binary form by the input devices before being fed to the CPU. This unit is also called the “receiving section” of a computer system.
Keyboard:
            It is one of the most useful input devices. It provides convenient to feed data in a computer. A computer keyboard is similar to an electronic typewriter keyboard with little modification. It has some additional keys like function keys, arrow keys, numeric keys etc.
Mouse:
            Mouse is a pointing device which is use to select an option and have two buttons to click on any option. Now a days laser type mouse is used.
Scanner:
            It scans the image of the information exposed to it and conveys these to computer’s memory for further processing.
Light pen:
            The light pen looks like an ordinary pen, but its tip is light sensitive detector. It is use to write/indicate information directly on monitors screen. When tip of the pen touched the surface of screen, the computer locates its position in the form of x-y coordinates of that point. A wire to CPU connects this pen. The written information is, at the same time conveyed to memory also. For example, you might have seen a circle drawn around a fielder during cricket match telecast. This circle is drawn by the light pen.
            Magnetic tape and cartridges are used to input data into computer for various applications.
Output devices:
            Such part of a computer where by a computer provides us the results of processing are called output units. The output units receive the data from CPU in the form of binary bits. Some common output deices are listed below.
Monitor:
            The results are termed as output from computer, output is displayed on a device that is similar to TV and is called monitor known as VDU (visual display unit). The data can be presented on the screen either as words, numbers, graphics, tables or diagrams. Monitor use the technology of cathode ray tube (CRT). Usually it is of 14” screen size when measured diagonally and has a 25*80 (25 rows and 80 character per row) display. Display of output on monitor is power dependent, vanishes when power is switched off. Many different types of monitor are in common use. These may be of VGA, SVGA, MVGA and EVGA   types, depending on the resolution.
 They are.
Paper white monitor:
            A display monitor in which text and graphics character are displayed in black against the white background to resemble the appearance of printed page. Some manufacturers
Monochrome monitor
Color monitor
 E.g. monitor, printer, plotter etc.
Processing unit:

            This is the main part of a computer therefore it is also called the brain of computer system. It is contained on a single integrated circuit or “chip”. All jobs of processing are carried out in this unit that is also called (C.P.U) central processing unit.

A C language program to print Triangle of asterisks (*).


#include<stdio.h>
void draw_j(void);
void main()
{
          clrscr();
          draw_j();
          getch();
}
void draw_j(void)
{
          int a,s;
          for(a=5;a>=1;a--)
          {
          s=1;
          while (s<=a)
          {
          printf("*");
          s++;
          }
          printf("\n");
          }
}

OUTPUT:
********
*******
******
*****
****
***
**

*