Brows C & C++ Programs and Projects 1. C Program to solve “Bubble Sorting Algorithm example” Complete C language Program of algorithm. 2.C Program of “Analog Clock ” complete program, create analog clock in c language.
Continue reading »
Bubble Sorting Algorithm example ——————————– Program takes a hardcoded array of certain numbers and sorts them using a simple bubble sort algorithm that I put into a function. I used a macro insteadof a function for the swapping b/c it’s easier to read and understand. The program outputs a beforeand after of the elements of the array to show that it actually did something. ***************************************************/ #include <stdio.h> #include <stdlib.h> #define SWAP(a,b) { int t;...
Continue reading »
# include <graphics.h> # include <dos.h> # include <stdio.h> # include <conio.h> # include <math.h> # include <process.h> void frame(); void star_in(int, int, int, int, int, float, float); void line_at_angle(int, float, int); void beep(int, int); void clear (int, int, int, int, int); void main() { int gdriver=DETECT,gmode,errorcode; initgraph(&gdriver,&gmode,”c:\tc\bgi”); errorcode=graphresult(); if(errorcode!=grOk) { printf(“ Graphics error %s”,grapherrormsg(errorcode)); printf(“ press any key to halt. “); exit(1); } struct time t; gettime(&t); int key,k=0;...
Continue reading »