Skip to main content

Posts

Showing posts from March, 2017

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)