Drop Down MenusCSS Drop Down MenuPure CSS Dropdown Menu

My C/C++ V1.20.5 released
Mai 13 2020

  • Ajout de bibliothèque winBGIm
  • Fixed Bugs

  • Windows XP SP3(x86/x64)
  • Windows Vista(x86/x64)
  • Windows 7(x86/x64)
  • Windows 8(x86/x64)
  • Windows 10(x86/x64)

samedi 16 mai 2020

Onde cosinus (graphics.h)

#include <conio.h> #include <math.h> #include <graphics.h> #include <dos.h> int main() { int gd = DETECT, gm; int angle = 0; double x, y; initgraph(&gd, &gm, "C:\\TC\\BGI"); line(0, getmaxy() / 2, getmaxx(), getmaxy() / 2); /* generate a sine wave */ for(x = 0; x < getmaxx(); x+=3) { /* calculate y value given x */ y = 50*sin(angle*3.141/180); y = getmaxy()/2 - y; /* color a pixel at the given position */ putpixel(x, y, 15); delay(100); /* increment angle */ angle+=5; } getch(); /* deallocate memory allocated for graphics screen */ closegraph(); return 0; }
Onde cosinus (graphics.h) Lire la suite...

Graphique à secteurs (graphics.h)

#include<graphics.h> #include<conio.h> int main() { int gd = DETECT, gm, x, y; initgraph(&gd, &gm, "C:\\TC\\BGI"); settextstyle(BOLD_FONT,HORIZ_DIR,2); outtextxy(220,10,"PIE CHART"); /* Setting cordinate of center of circle */ x = getmaxx()/2; y = getmaxy()/2; settextstyle(SANS_SERIF_FONT,HORIZ_DIR,1); setfillstyle(SOLID_FILL, RED); pieslice(x, y, 0, 60, 120); outtextxy(x + 140, y - 70, "FOOD"); setfillstyle(SOLID_FILL, YELLOW); pieslice(x, y, 60, 160, 120); outtextxy(x - 30, y - 170, "RENT"); setfillstyle(SOLID_FILL, GREEN); pieslice(x, y, 160, 220, 120); outtextxy(x - 250, y, "ELECTRICITY"); setfillstyle(SOLID_FILL, BROWN); pieslice(x, y, 220, 360, 120); outtextxy(x, y + 150, "SAVINGS"); getch(); closegraph(); return 0; }
Graphique à secteurs (graphics.h) Lire la suite...

Dessiner des étoiles dans le ciel (graphics.h)

#include <conio.h> #include <graphics.h> #include <dos.h> #include <stdlib.h> int main() { int gd = DETECT, gm; int i, x, y; initgraph(&gd, &gm, "C:\\TC\\BGI"); while (!kbhit()) { /* color 500 random pixels on screen */ for(i=0; i<=500; i++) { x=rand()%getmaxx(); y=rand()%getmaxy(); putpixel(x,y,15); } delay(500); /* clears screen */ cleardevice(); } getch(); closegraph(); return 0; }
Dessiner des étoiles dans le ciel (graphics.h) Lire la suite...

Horloge numérique (graphics.h)

#include <conio.h> #include <graphics.h> #include <time.h> #include <dos.h> #include <string.h> int main() { int gd = DETECT, gm; int midx, midy; long current_time; char timeStr[256]; initgraph(&gd, &gm, "C:\\TC\\BGI"); /* mid pixel in horizontal and vertical axis */ midx = getmaxx() / 2; midy = getmaxy() / 2; while (!kbhit()) { cleardevice(); setcolor(WHITE); setfillstyle(SOLID_FILL, WHITE); rectangle(midx - 250, midy - 40, midx + 250, midy + 40); floodfill(midx, midy, WHITE); /* Get Current epoch time in seconds */ current_time = time(NULL); /* store the date and time in string */ strcpy(timeStr, ctime(&current_time)); setcolor(RED); settextjustify(CENTER_TEXT, CENTER_TEXT); settextstyle(SANS_SERIF_FONT, HORIZ_DIR, 4); moveto(midx, midy); /* print current time */ outtext(timeStr); /* Add delay of 1000 milliseconds(1 second) */ delay(1000); } getch(); closegraph(); return 0; }
Horloge numérique (graphics.h) Lire la suite...

 
Back to top