GTU MCA-CSE-IT Practical Solution

GTU MCA Practical Solution for C ,C++, java, DBMS, SQL, RMI, CORBA, Network Programming, Servlet, JSP, ASP Code.

Pascal in C

#include "stdio.h"
#include "conio.h"

double fact(double n)
{
return (n > 1) ? n * fact(n - 1) : 1;
}

double ncr(int n, int r)
{
return fact(n) / (fact(r) * fact(n - r));
}

void main()
{
int i=0,j=0;
clrscr();
for (i = 0; i < 15; i++)
{
for (j = 0; j <= i; j++)
{
printf(" %lf ",ncr(i,j));
}
printf("\n");
}
getch();
}
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest
Labels: clrscr, conio.h, factorial, getch, in c, Pascal, recursive, stdio.h
Newer Post Older Post Home

Total Pageviews

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Popular Posts

  • Write a program of Vertical Redundancy Check - VRC
  • C++ Practical List
  • Java Practical List for MCA , HNGU, Patan
  • RMI String Manipulation
  • C Language ( Fundametal of Programming ) Practical List,MCA Semester-I ,HNGU,Patan
  • GTU Network Programming Practical List
  • Bresenham's line drawing algorithm - 1
  • RMI Matrix
  • How to Run RMI Program?
  • Visual C++ Practical List - 1

Blog Archive

  • ►  2011 (6)
    • ►  10/09 - 10/16 (4)
    • ►  04/10 - 04/17 (2)
  • ►  2010 (11)
    • ►  12/12 - 12/19 (6)
    • ►  11/28 - 12/05 (2)
    • ►  01/17 - 01/24 (3)
  • ▼  2009 (22)
    • ►  12/20 - 12/27 (8)
    • ▼  11/22 - 11/29 (1)
      • Pascal in C
    • ►  11/15 - 11/22 (12)
    • ►  10/04 - 10/11 (1)

Search

Related Term

Add (1) AITS (1) Array (8) Array Code (7) Array in C (1) Atmiya (1) BCA (8) Binary File in C (1) C (1) C language (10) C Program (1) clrscr (1) Command Line Argument (4) Conditional Operator (1) conio.h (1) Create Link List (1) Data Structure (9) Delete Node (1) Delete Specific Node (1) Deleting Array (5) Deleting Duplicate from array (4) Enumerated Data Type (1) Example in C (1) Example of Enum in C (1) factorial (2) File Management in C (1) FileCopy (1) Find Substring in C (1) FOP (1) Function in C (1) getch (1) GTU Network Programming Practical List (1) HNGU (1) in c (1) Inverse of Matrix (1) Java (1) Linear Array (1) link List (2) Matrix (1) Matrix Multiplication (1) MCA (10) Network Management (1) Network Programming (1) Object Oriented (1) One Dimension Array (1) Operating System (1) Orthogonal matrix (1) OSNM (1) Pascal (1) Pass By Reference (1) Pass By Value (1) Patan (1) Position (2) Practical List (2) Program (1) Quick Sort (1) Rajkot (1) Rank (1) Rank of Matrix (1) Read Binary File (1) Read Record (1) Recursion Function (1) recursive (1) RMI Matrix (1) RMI String Manipulation (1) RMI System Date (1) RUN RMI Program (1) Search in Link List (1) Search operation (1) Semester (1) Simple File Management (1) Sorting Data (1) Sorting Data Using Quick Sort (1) spiral (1) sqrt (1) stdio.h (1) strpbrk (1) Technology (1) Traversing (3) Upper (1) Value (2) Vertical Redundancy Check (1) VRC (1) Write Record (1)
Simple theme. Powered by Blogger.