25102010

Deret No 1

Coding :

#include <stdio.h>
#include <conio.h>
main ()
{
int f,r,e,s,h,i;
clrscr();
printf (“input : “);
scanf (“%d”, &f);
for (r=1;r<=f;r++)
{
printf (“\n”);
for (e=1;e<=r;e++)
{
printf (“%d”,e);
}
}
getch();
}

Output :

 

 

 

 

============================================================

 

Deret No 2

Coding:

#include <stdio.h>
#include <conio.h>
main ()
{
int f,r,e,s,h,i;
clrscr();
printf (“input : “);
scanf (“%d”, &f);
for (r=f;r>=1;r–)
{
printf (“\n”);
for (e=1;e<=r;e++)
{
printf (“%d”,e);
}
}
getch();
}

 

Output:

 

 

 

 

 

============================================================

 

Deret No 3

Coding:

#include <stdio.h>
#include <conio.h>
main ()
{
int f,r,e,s,h,i;
clrscr();
printf (“input : “);
scanf (“%d”, &f);
for (r=1;r<=f;r++)
{
printf (“\n”);
for (e=1;e<=r;e++)
{
printf (“%d”,e);
}
}
f=f-1;
for (s=f;s>=1;s–)
{
printf (“\n”);
for (h=1;h<=s;h++)
{
printf (“%d”,h);
}
}
getch();
}

 

Output:

 

 

 

 

 

 

Download all: Maknyos.com

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: