The Eduladder is a community of students, teachers, and programmers just interested to make you pass any exams. So we help you to solve your academic and programming questions fast.
In eduladder you can Ask,Answer,Listen,Earn and Download Questions and Question papers.
Watch related videos of your favorite subject.
Connect with students from different parts of the world.
Apply or Post Jobs, Courses ,Internships and Volunteering opportunity. For FREE
See Our team
Wondering how we keep quality?
Got unsolved questions? Ask Questions


You are here:Open notes-->Anna-University-->GE2115-Computer-practice-Laboratory-Part-2

GE2115-Computer practice Laboratory Part-2

How to study this subject

11. Program to print natural numbers from 1 to 10 in Reverse
# include
# include
 main( )
{
int i;
clrscr( );
for (i=10; i>=1; i--)
printf(“%d\n”,i);
getch( );
}
12. Program to print sum of the natural numbers from 1 to 10.
# include
# include
 main( )
{
int n,sum=0,i;
clrscr( );
for (i=1; i<=10; i++)
sum=sum+i;
printf(“sum of natural numbers from 1 to 10 is %d\n”,sum);
getch( );
}
13. Program to accept a number and print mathematical table of the given no.
# include
# include
 main( )
{
int i,t;
clrscr( );
printf(“which table u want:”);
scanf(“%d”,&t);
for (i=1; i<=10; i++) . 5
printf(“\n%d*%d=%d”,t,i,i*t);
getch( );
}
14. Program to print 1 to 10 mathematical tables .
# include
# include
 main( )
{
int i,j;
clrscr( );
for (i=1; i<=10; i++)
for(j=1;j<=10;j++)
printf(“\n%d*%d=%d”,i,j,i*j);
getch( );
}
15. Program to print fibonacci series .
# include
# include
main( )
{
int a=0,b=1,c=0,i;
clrscr( );
printf(“%d”,a);
printf(“\n%d”,b);
for (i=1; i<=10; i++)
{
c=a+b;
printf(“\n%d”,c);
a=b;
b=c;
}
getch( );
}
16. Program to print numeric pyramid
# include
# include
main()
{
int i,j;
clrscr( );
for(i=1;i<=5;i++)
{
for(j=1;j<=i;j++)
printf(“%d”,j);
printf(“\n”);
}
getch();
} . 6
17. Program to print numerical pyramid.
# include
# include
main( )
{
int i,j ,l,k=40;
clrscr( );
for(i=1;i<=9;i+=2)
{
for(l=1;l<=k;l++)
printf(“ “ );
for(j=1;j<=i;j++);
printf(“%d”,j);
printf(“\n”);
k=k-2;
}getch( );}
18. Program to print numerical diamond.
# include
# include
main( )
{
int i,j,l,n,s,k=40;
clrscr( );
for(i=1;i<=9;i+=2)
{
for(l=1;l<=k;l++)
printf(“ “);
for(j=1;j<=i;j++)
printf(“\n”);
k=k-2;
}
k=k+4;
for(n=7;n>=1;n-=2)
{
for(i=1;i<=k;i++)
printf(“ “);
for(s=1;s
printf(“%d”,s);
printf(“\n”);
k=k+2;
}
getch( );
} . 7
19. Program to print character pyramid.
# include
# include
main( )
{
char i,j;
clrscr();
for(i=65;i<=70;i++)
{
for(j=65;j<=i;j++)
printf(“%c”,j);
printf(“\n”);
}
getch( );
}
20. Program to print character diamond.
# include
# include
main( )
{
char i,j,n,r;
int s,sp=40;
clrscr( );
for(i=65;i<=75;i+=2)
{
for(s=1;s<=sp;s++)
printf(“ “);
for(j=65;j
printf(“%c”,j);
printf(“\n”);
sp=sp-2;
}
sp=sp+4;
for(n=73;n>=65;n-=2)
{
for(s=1;s<=sp;s++)
printf(“ “);
for(r=65;r<=n;r++)
printf(“%c”,r);
sp=sp+2;
}
getch( );
}

Add contents here


Official Notes


Add contents here


Notes from other sources


Add contents here


Model question papers


Add contents here


Previous year question papers


Add contents here


Useful links


Add contents here



Editors




You might like this video:Watch more here

Watch more videos from this user Here

Learn how to upload a video and start earning here