Skip to main content

Posts

Showing posts from July, 2015

History of Microsoft Windows

Introduction : v   Developer: Microsoft v   Written in:  Assembly,C,C++ v   OS Family: Windows 9x, Windows CE    And Windows NT v   Working State:  Publicly released v   Source Model:    Closed/Shared source v   Initial Release:  November 20,1985; 28 years  Ago, as Windows 1.0 v   Latest Release:      6.3.9600(October 17,2003) v   Marketing Target: Personal Computing v   Available in:       137 languages v   Update Method:  Windows Update                            Windows Anytime Upgrade                             Windows Store                              WSUS v   Package Manager: Windows Installer(.msi),                               Windows Store (.appx) v   Platforms:          ARM,IA-32,Itanium,X86-64 v   Kernel Type:Windows NT family; Hybrid                     Windows 9x and earlier;                      Monolithic (MS-DOS) v   Default UI:  Windows Shell v   License:     

Program to find nCr and nPr

#include<stdio.h> main() {       long fact(int);       int n,r,i;       long npr,ncr;       clrscr();       printf("\nEnter the value for N and R\n");       scanf("%d%d",&n,&r);       if(r<=n)       {             npr=fact(n)/fact(n-r);             ncr=npr/fact(r);             printf("\n%dP%d= %ld",n,r,npr);             printf("\n%dC%d= %ld",n,r,ncr);       }       else       {             printf("\nWrong Input (R<N)\n");       }       getch(); } long fact(int n) {       if(n!=0)             return(n*fact(n-1));       else             return (1); }

Program to generate N Prime Numbers.

#include<stdio.h> main() {       int n,np,i,c=0,flag; clrscr();       printf("\nTotal number of prime numbers needed\n");       scanf("%d",&np);       n=2;       printf("\n Following are the Prime Numbers: \n");       while(1)       {             flag=1;             for(i=2;i<=n/2;i++)             {                   if(n%i==0)                   {                         flag=0;                         break;                   }             }             if(flag==1)             {                   c++;                   printf("%d\t",n);             }             if(c==np)             break;             n++;       }       getch(); }

Program to reverse a number and find the sum of individual digits. Also check for paliondrome.

#include<stdio.h> main() {       int sum=0,rem,rev=0,t=0,n; clrscr();       printf("\nEnter an integer number");       scanf("%d",&n);       t=n;       while(n>0)       {             rem=n%10;             rev=rev*10+rem;             sum=sum+rem;             n=n/10;       }       printf("Sum of digits= %d\n",sum);       printf("\nReverse of the digit is %d",rev);       if(t==rev)       {             printf("\nPalindrome number");       }       else       {             printf("\nNot a Palindrome number\n");       }       getch(); }