c programming

Loading Program In C Programming Graphics

loading-program-in-c-programming-graphics



In c programming graphics you can easily create a program of loading by using loops and conditions. In this tutorial, I will provide you loading program in c programming graphics. 

It can be used at the start of any program to show that your program is made by a good programmer. This program is very simple and easy. It can also be placed in any other c program easily. 


Loading Program In C Programming Graphics:

Code of loading program in c programming graphics is this: 

#include<stdio.h>
#include<conio.h>
#include<graphics.h>
#include<dos.h>

void main(void)
{
 int driver=DETECT, mode;


        int i;

initgraph(&driver,&mode,”c:\TURBOC3\bgi”);   //initialize graphics mode
   textcolor(BLACK);      //background color

         moveto(200,180);        //loading process
  outtext(“Loading, please wait…”);
     for(i=0;i<600;i+=15)
     {
      setcolor(3);            //loading bar color
      line(20,380,i+39,380);
      delay(150);         //slow down loop speed
     }
  setcolor(WHITE);
  moveto(210,200);
  outtext(“Loading Completed!”);   //loading process complete
  delay(1000);
       closegraph();               //close graphics mode


}

Output:

loading-program-in-c-programming-graphics


Features Of Loading Program:

The main features of loading program in c programming graphics are:
  • You will learn about graphics in c programming.
  • You will be able to use for loops in c programs.
  • You will know about the move to function.
  • Out text function is also used in this program.
  • Delay function is used in this program.
  • Set color function is used.

Conclusion:

The main aim of providing loading program is to increase your abilities for programming. This code will help you making and decorating your assignments of c programming.
Feel free to comment below.

Farhan khursheed

Farhan Khursheed is a passionate blogger from Karachi, Pakistan. He loves to write about SEO, Internet tips, and tricks, and earn online. He also loves programming.

Leave a Reply

Your email address will not be published. Required fields are marked *

Close
www.000webhost.com