Skip to main content

Posts

Showing posts from 2017

Introduction To Algorithms, 3rd Edition

Before there were computers, there were algorithms. But now that there are computers, there are even more algorithms, and algorithms lie at the heart of computing. This book provides a comprehensive introduction to the modern study of computer algorithms. It presents many algorithms and covers them in considerable depth, yet makes their design and analysis accessible to all levels of readers. In this book, the authors tried to keep explanations elementary without sacrificing depth of coverage or mathematical rigor. Each chapter presents an algorithm, a design technique, an application area, or a related topic. Algorithms are described in English and in a pseudocode designed to be readable by anyone who has done a little programming. The book contains 244 figures — many with multiple parts — illustrating how the algorithms work. It also includes careful analysis of the running times of all algorithms. In this third edition, the entire book once again updated including changes cove

The C Programming Language, 2nd Edition*

This book is meant to help the reader learn how to program in C. It is the definitive reference guide, now in a second edition. Although the first edition was written in 1978, it continues to be a worldwide best-seller. This second edition brings the classic original up to date to include the ANSI standard. For evolution of the planet earth and our modern understanding of biology, there was Darwin's Origin of the Species. For mathematics, there was Newton's Philosophiæ Naturalis Principia Mathematica. Well, for the internet, for Facebook, for LinkedIn, Twitter, Instgram, Snapchat, WhatsApp, Pornhub and even the odious website for Justin Bieber would never have existed without Kernigan and Ritchie (more affectionately known as K&R)'s classic, The C Programming Language. What language was TCP/IP written in? C. What language inspired both C++ and Java (and the abominable C#)? C. What language are most libraries on most operating systems written in if not assembler? C.

Java: A Beginner's Guide, 6th Edition

This is Herb's step-by-step introduction to Java, updated for Java SE 8 (JDK 8). If you are just learning Java, then this is the book for you.  It starts at the beginning, explaining the history of Java, why it's important to the Web, and how it relates to the world of programming at large.  You then learn how to obtain the Java Development Kit (JDK) and write your first Java program. Next, it's on to the Java fundamentals, including data types, operators, control statements, classes, objects, and methods.  You'll then progress to more advanced topics, such as inheritance, exception handling, the I/O system, multithreading,  applets, and lambda expressions. Also included is coverage of some of Java's most powerful features, such as generics, autoboxing, enumerations, and static import.  An introduction to JavaFX, Java's newest GUI framework, is also included. *** TO REVIEW BOOK *** (click below) *** TO REVIEW SOURCE CODE PROBLEM  SOLUTIO

Java: The Complete Reference, 9th Edition

This is Herb's most popular book on Java, fully updated and expanded to cover Java SE 8 (JDK 8).    Whether you're an experienced pro or just starting out, this one-stop guide will help you master this important language.  Inside you'll find comprehensive coverage of the Java language, its keywords, syntax, and fundamental programming principles.  Of course, descriptions of Java's newest features, such as lambda expressions, default interface methods, and the stream API are included. This lasting resource also describes key elements of the Java API library, such as the Collections Framework, concurrency, applets, servlets, Beans, event handling,  AWT,  Swing, and more. Coverage of JavaFX, Java's newest GUI framework, is also included. *** TO REVIEW BOOK ***  (click below) *** TO REVIEW SOURCE CODE PROBLEM  SOLUTIONS, VISIT   THIS   LINK ***

Screenshots from Windows 1.01

Windows 1.0 is a graphical personal computer operating environment developed by Microsoft, released on November 20, 1985, as the first version of the Microsoft Windows line. Version 1.01 , also released in 1985, was the first point-release after Windows 1.00.   Screenshots from Windows 1.01: ⇰ Desktop  First Run Empty Desktop Desktop With Applications ⇰  Office Applications Notepad Text Editor Calculator Calendar Clock Address Book ⇰  Multimedia Applications Media player, CD player, Volume level, and Sound: This GUI doesn’t have these features. ⇰  Networking Applications Terminal Phone Dialer: This GUI doesn’t have this feature. ⇰  Internet Applications Browser, and Mail: This GUI doesn’t have these features. ⇰  Accessibility Applications Keyboard Map:  This GUI doesn’t have this feature. ⇰  Settings Desktop themes,  Display,  Screensaver,  Keyboard, Mouse,  Accessibility,  Power M

Introduction To C++ Programming - Part 10.

C++ Program To Convert Binary Number To Decimal & Vice-Versa. #include <iostream> #include <cmath> using namespace std; int binary_decimal(int n); int decimal_binary(int n); int main() { int n; char c; cout << "Instructions: " << endl <<endl; cout << "1. Enter Alphabet 'd' To Convert Binary To Decimal." << endl; cout << "2. Enter Alphabet 'b' To Convert Decimal to Binary." << endl << endl; cin >> c; if (c =='d' || c == 'D') { cout << "\nEnter A Binary Number: "; cin >> n; cout << endl << n << " In Binary = " << binary_decimal(n) << " In Decimal" << endl; } if (c =='b' || c == 'B') { cout << "\nEnter A Decimal number: "; cin >> n; cout << endl << n << " In Decimal =

Introduction To C++ Programming - Part 9.

C++ Program To Add Two Matrices Using Multi-dimensional Arrays #include<iostream> #include<cstdlib> using namespace std; int main() { int A[10][10],B[10][10],c[10][10]; int i,j,m,n,p,q; cout << "Number Of Rows & Columns Of Matrix A: " << endl; cin >> m >> n; cout << "\nNumber Of Rows & Columns Of Matrix B: " << endl; cin >> p >> q; if(m==p&&n==q) cout << "\n\nMatrices Can Be Added."; else { cout << "\nMatrices can Not Be Added Because They're Not The Same Size..\n"; exit(0); } cout<<"\nEnter Matrix A: " << endl; for(i=0;i<m;i++) { for(j=0;j<n;j++) cin >> A[i][j]; } cout<<"\nMatrix A:\n"; for(i=0;i<m;i++) { for(j=0;j<n;j++) cout << A[i][j] <<" "; cout << "\n"; } cout << "\nEnter Matrix B: " << endl; for(i=0;i<m;i++) { for(j

C++ Program To Implement Casino Number Guessing Game.

#include <iostream> #include <string> #include <cstdlib> #include <ctime> using namespace std; void drawLine(int n, char symbol); void rules(); int main() { string playerName; int amount; int bettingAmount; int guess; int dice; char choice; srand(time(0)); drawLine(70,'_'); cout << "\n\n\n\t\tCASINO GAME\n\n\n\n"; drawLine(70,'_'); cout << "\n\nEnter Your Name : "; getline(cin, playerName); cout << "\n\nEnter Deposit Amount To Play Game : $"; cin >> amount;

Inside A System Unit Of Desktop Computer

Have you ever looked inside a computer case, or seen pictures of the inside of one? The small parts may look complicated, but the inside of a computer case isn't really all that mysterious. This lesson will help you master some of the basic terminologies and understand a bit more about what goes on inside a computer. Watch the video below to learn about what's inside a desktop computer.

What Is A computer?

A computer is a device that accepts information (in the form of digitized data) and manipulates it for some result based on a program or sequence of instructions on how the data is to be processed. Complex computers also include the means for storing data (including the program, which is also a form of data) for some necessary duration. A program may be invariable and built into the computer (and called logic circuitry as it is on microprocessors) or different programs may be provided to the computer (loaded into its storage and then started by an administrator or user). Today's computers have both kinds of programming. Watch the video below to learn about different types of computers.

C++ Program To Implement Hangman Game.

#include <iostream> #include <cstdlib> #include<ctime> #include <string> using namespace std; const int MAX_TRIES=5; int letterFill (char, string, string&); int main () { string name; char letter; int num_of_wrong_guesses=0; string word; string words[] = { "india", "pakistan", "nepal", "malaysia", "philippines", "australia", "iran", "ethiopia", "oman", "indonesia" }; srand(time(NULL)); int n=rand()% 10; word=words[n];

Introduction To C++ Programming - Part 8.

C++ Program To Multiply Two Matrices Using Multi-dimensional Arrays #include <iostream> using namespace std; int main() { int a[10][10], b[10][10], mult[10][10], r1, c1, r2, c2, i, j, k; cout << "Enter No. Of Rows & Columns For First Matrix:\n"; cin >> r1 >> c1; cout << "\nEnter No. Of Rows & Columns For Second Matrix:\n"; cin >> r2 >> c2; while (c1!=r2) { cout << "\nError! Column Of First Matrix Is Not Equal To Row Of Second Matrix.\n"; cout << "\nEnter No. Of Rows & Columns For First Matrix:\n"; cin >> r1 >> c1; cout << "\nEnter No. Of Rows & Columns For Second Matrix:\n"; cin >> r2 >> c2; } cout << endl << "\nEnter The Elements Of Matrix 1:" << endl; for(i=0; i<r1; ++i)

C++ Program To Implement Student Report Card System.

#include<iostream> #include<fstream> #include<iomanip> #include <cstdlib> using namespace std; class student { int rollno; char name[50]; int p_marks, c_marks, m_marks, e_marks, cs_marks; double per; char grade; void calculate(); public: void getdata(); void showdata() const; void show_tabular() const; int retrollno() const; }; void student::calculate() { per=(p_marks+c_marks+m_marks+e_marks+cs_marks)/5.0; if(per>=60) grade='A'; else if(per>=50)  grade='B'; else if(per>=33) grade='C'; else grade='F'; }

C++ Program To Implement Tic Tac Toe Game.

#include <iostream> #include<cstdlib> using namespace std; char square[10] = {'o','1','2','3','4','5','6','7','8','9'}; int checkwin(); void board(); int main() { int player = 1,i,choice; char mark; do { board(); player=(player%2)?1:2; cout << "Player " << player << ", Enter A Number: "; cin >> choice; mark=(player == 1) ? 'X' : 'O'; if (choice == 1 && square[1] == '1') square[1] = mark; else if (choice == 2 && square[2] == '2') square[2] = mark; else if (choice == 3 && square[3] == '3') square[3] = mark; else if (choice == 4 && square[4] == '4') square[4] = mark;

Introduction To C++ Programming - Part 7.

C++ Program To Check Whether A Number Is The Sum Of 2 Prime Numbers #include <iostream> using namespace std; int check_prime(int n); int main() { int n, i, flag=0; cout << "Enter A Positive Integer: "; cin >> n; for(i=2; i<=n/2; ++i) { if (check_prime(i)==0){ if ( check_prime(n-i)==0) { cout << endl<< n << " = " << i << " + " << n-i << endl; flag=1; }}} if (flag==0) cout << endl << n << " Can't Be Expressed As Sum Of Two Prime Numbers." << endl; return 0; } int check_prime(int n) /*check prime number*/ { int i, flag=0; for(i=2;i<=n/2;++i) { if(n%i==0) { flag=1; break; }} return flag; }

Introduction To C++ Programming - Part 6.

C++ Program To Calculate Standard Deviation Of Given Numbers #include <iostream> #include <cmath> using namespace std; int main() { int n , j ,y; double _sum=0 , variance; cout << "How Many Numbers To Type? "; cin >> y; cout << endl; double max[y]; for(n=0;n<=y-1;n++) { cout << "Enter Number " << n+1 << " : "; cin >> max[n]; } n=0; cout << endl; cout << "\nSo The Numbers Are:\t"; for(j=0;j<=y-1;j++) { cout << max[n] << "\t"; _sum+=max[n]; n++; }

C++ Program To Implement Bank Management System.

#include<iostream> #include<fstream> #include<cctype> #include<iomanip> #include <cstdlib> using namespace std; class account { int acno; char name[50]; int deposit; char type; public: void create_account(); //function to get data from user void show_account() const; //function to show data on screen void modify(); //function to add new data void dep(int); //function to accept amount and add to balance amount void draw(int); //function to accept amount and subtract from balance amount void report() const; //function to show data in tabular format int retacno() const; //function to return account number int retdeposit() const; //function to return balance amount char rettype() const;  //function to return type of account }; void account::create_account() { cout<<"\nEnter The Account No. : "; cin>>acno; cout<<"\n\nEnter The Name Of The Account Holder : "; cin.ig

Introduction To C++ Programming - Part 5.

C++ Program To Remove All Characters In A String Except Alphabet #include<iostream> #include<cstring> using namespace std; int main() { char line[150]; int i,j; cout << "Enter A String: "; cin.getline(line, 150); for(i=0; line[i]!='\0'; ++i) { while (!((line[i]>='a'&&line[i]<='z')|| (line[i]>='A'&&line[i]<='Z'|| line[i]=='\0'))) { for(j=i;line[j]!='\0';++j) { line[j]=line[j+1]; } line[j]='\0'; }} cout << "\nOutput String: " << line; return 0; } C++ Program To Find The Number Of Vowels, Consonants, Digits And White Spaces In A String #include<iostream> #include<cstring> using namespace std; int main() { char line[150]; int i,v,c,ch,d,s,o; o=v=c=ch=d=s=0; cout<<"Enter A Sentence: "; cin.getline(line, 150);