Archive for the ‘Dos’ Category

GW-BASIC is the first computer language that I coded some programs and ran on PC (X86 CPU family). I have coded with Basic language when I was 16 but I ran it on commodore 64 not X86 family.

GW basic is an advanced version of basic language which has an IDE or simple editor.

To get more info click here

Well, I think everybody knows and heard about the C language,  The C is one of the most popular computer programming languages of all time.  It was developed by Dennis Ritchie (1969-1973) at Bell Telephone Laboratories in order to use in Unix operating system.

C Book:

http://www.amazon.com/Programming-Language-2nd-Brian-Kernighan/dp/0131103628

 

Read or Download :  C Book Dennis M. Ritchie

 

I coded a lot of programs in C, I love it.  I remember that the first compiler that I used was Turbo C/C++ and then I used Borland C++. both of them are MS dos-based applications.

 

Turbo C (v 1.01) has 2 floppy disket, If you would like to download it click here

 

 

Also, for version  4.5 click here

Borland C/C++:

 

 

 

 

Eclipse CDT (C/C++ Development Tooling)

The Eclipse CDT is an advanced C and C++ IDE based on the popular Eclipse platform. It features managed builds, various source knowledge tools, such as type hierarchy, call graph, include browser, macro definition browser, code editor with syntax highlighting, source code refactoring, code generation, visual debugging tools, including memory, registers, and disassembly viewers.

Bloodshed Dev-C++

Bloodshed Dev-C++ or DevCPP in short, is a full-featured IDE for C and C++ programming languages. It uses Mingw port of GCC (GNU Compiler Collection) as its compiler. Its features includes support for GCC-based compilers, integrated debugging using gdb, customizable syntax highlighting editor, automatic code completion, Profiling support, and much more.
Code::Blocks

Code::Blocks or Codeblocks is a free C++ IDE which can be used even in the most demanding situations. It is designed from the scratch, to be very extensible and fully configurable.
It features customizable and extensible syntax highlighting, code folding, tabbed interface, code completion, class Browser, multi user support and much more.

 

Netbeans IDE
You’ll be probably surprised to see Netbeans listed here, as its a popular Java IDE. But it can be used for C and C++ development as well. You can develop professional quality native applications in C, C++ using Netbeans IDE.
Its features include C and C++ unit testing, integrated profiler, packaging support, gdb integration, syntax highlighting and code assistance.
Microsoft Visual Studio Express

Microsoft® Visual Studio® 2010 Express is probably the best C++ IDE. Its free but you have to register your copy within 30 days of installation.
Download Microsoft® Visual Studio® 2010 Express Edition

The following program (C++  programming language) is implemented the Prim’s algorithm.

//========>   Prims Algorithm                 <===========\\

#include <iostream.h>
#include <conio.h>
#define ROW 7
#define COL 7
#define infi 10000  //infi for infinity
class prims
{
 int graph[ROW][COL],nodes;
 public:
 prims();
 void createGraph();
 void primsAlgo();
};
prims :: prims(){
 for(int i=0;i<ROW;i++)
 for(int j=0;j<COL;j++)
 graph[i][j]=0;
}
void prims :: createGraph(){
 int i,j;
 cout<<"Enter Total Nodes: ";
 cin>>nodes;
 cout<<"\n\nEnter Adjacency Matrix : \n";
 for(i=0;i<nodes;i++)
 for(j=0;j<nodes;j++)
 cin>>graph[i][j];

 for(i=0;i<nodes;i++){
 for(j=0;j<nodes;j++){
 if(graph[i][j]==-1)
 graph[i][j]=infi;
 }
 }
}
void prims :: primsAlgo(){
 int selected[ROW],i,j,ne; //ne for no. of edges
 int false=0,true=1,min,x,y;
 for(i=0;i<nodes;i++)
 selected[i]=false;
 selected[0]=true;
 ne=0;

 while(ne < nodes-1){
 min=infi;

 for(i=0;i<nodes;i++)
 {
 if(selected[i]==true){
 for(j=0;j<nodes;j++){
 if(selected[j]==false){
 if(min > graph[i][j])
 {
 min=graph[i][j];
 x=i;
 y=j;
 }
 }
 }
 }
 }
 selected[y]=true;
 cout<<"\n"<<x+1<<" ===> "<<y+1;
 ne=ne+1;
 }
}
void main(){
 prims MST;
 clrscr();
 cout<<"\n                     Prim Algorithm\n";

 MST.createGraph();
 MST.primsAlgo();
 getch();
}

Program Output:

This C program generate a random number by normal distribution function N(0,1):

Here is source code:

//=====>   Generate Random Number by Normal Distribution <=====\\

#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <conio.h>
#include <time.h>

//===> Generate Random Number between 0 , 1
double GetRandom()
{
 int i;
 double rn;
 time_t t;
 srand((unsigned) time(&t));
 rn=random(1000)/1000.0;
 return rn;
}
double GenerateRandomNormal()
{
 double u1,u2,v1,v2;
 double s=2.0;
 double r;
 while (s>=1.0)
 {
 u1=GetRandom();
 u2=GetRandom();
 v1=2.0*u1-1;
 v2=2.0*u2-1;
 s=pow(v1,2)+pow(v2,2);
 };
 r=double(v1*sqrt((-2.0*log(s))/s));
 return r;

}
//===> Generate Random number from Normal Distribution N(0,1)
int main(void)
{
 int n,i;
 clrscr();
 printf("Generate Random Number from Normal Distribution N(0,1)\n\n");
 printf("R=%lf",GenerateRandomNormal());
 getch();
 return 0;
}

Program Out put picture:

GW Basic

This is the first pascal compiler that I used:

Turbo Pascal 5.5

The IDE provided two more important features — step-by-step debugger and context-sensitive help with description of all built-in functions and possibility of copying fragments of code from help window and pasting it to your code.

Download here

 

Turbo Pascal  6.0

Turbo Pascal 6

Turbo Pascal 6

Turbo Pascal  7.1

Turbo Pascal 7.1

Turbo Pascal 7.1