C++ program to create a loading bar

#include<iostream.h> #include<conio.h> #include<graphics.h> #include<dos.h> void main() { int x=170,i,gdriver=DETECT,gmode; initgraph(&gdriver,&gmode,”c:\tc\bgi”); settextstyle(DEFAULT_FONT,HORIZ_DIR,2); outtextxy(170,180,”LOADING,PLEASE WAIT”); for(i=0;i<300;++i) { delay(30); line(x,200,x,220); x++; } getch(); closegraph(); }

C++ Matrix Multiplication Program

Here you will get C++ matrix multiplication program. What we are doing in this program. Read number of rows and columns for two matrix. Then check if matrix multiplication is possible or not. If not possible then show a message to user otherwise multiply them. Finally display the result. C++ Matrix Multiplication Program   Output

C program to find sum of series 1+x+x^2+……+x^n

#include<stdio.h>#include<conio.h>#include<math.h>void main(){ int i,n; float x,sum=0; clrscr(); //to clear the screen printf(“1+x+x^2+……+x^n”); printf(“nnEnter the value of x and n:”); scanf(“%f%d”,&x,&n); for(i=1;i<=n;++i) sum+=pow(x,i); sum++; printf(“nSum=%f”,sum); getch(); //to stop the screen}