Tuesday, January 14, 2020

Printing message at same position on screen

Printing message at same position on Screen

This C program will print message on same position on screen without Graphics library.

#include<stdio.h>
#include<windows.h>

int main(){
  int i;
  for(i=0; i<=100; i++)
  {
    system("cls");
    printf("Software Installation %d %% completed", i);
    Sleep(10);
  }
  getch();
  return 0;
}

Output of program:

Software Installation 100 % completed

Note: This program prints "Software Installation %age [1 to 100] completed" message at same position on screen.


* * * * *


< Back to Home Page>




No comments:

Post a Comment