• Home   /  
  • Archive by category "1"

Cs201 Assignment No 3 Solution 2013

the correct code of cs201 assignmentn of ending date 16-2-016 is

#include<iostream>
#define MODEL "HP"
#define ALPHABET 26
#define NUMKEYS 10
#define FUNKEYS 12
using namespace std;

class Keyboard
{
public:
void operator=(const Keyboard &obj1);
Keyboard();
~Keyboard();

private:
string Model;
int Albkeys,Numkeys,Funkeys;
};

Keyboard::Keyboard()
{
Model=MODEL;
Albkeys=ALPHABET;
Numkeys=NUMKEYS;
Funkeys=FUNKEYS;
cout"\nKeyboard Created. "endl;

cout"\nModel "Model;
cout"\nAlbkeys "Albkeys;
cout"\nNumkeys "Numkeys;
cout"\nFunkeys "Funkeysendl;
}

void Keyboard::operator=(const Keyboard &obj1 )
{
Model=obj1.Model;
Albkeys =obj1.Albkeys;
Numkeys =obj1.Numkeys;
Funkeys =obj1.Funkeys;
cout"\nKeyboard is assigned "endl;
}

Keyboard::~Keyboard()
{
cout"\nKeyboard has been Destroyed "endl;
}

int main(void)
{
Keyboard *obj1=new Keyboard();
Keyboard obj2;
obj2=*obj1;

}

CS201 Solution Source Code

#include <iostream>#include <stdlib.h>#include <time.h> using namespace std; void generateArray (int [][7]); void showArray(int [][7]); void FindEvenNumber(int [][7]); int main() { int Array[7][7]; generateArray(Array); showArray(Array); FindEvenNumber(Array); cout << endl << endl ; system ("pause"); } void generateArray (int Array [][7]) { srand(time(NULL)); for (int i=0; i<7; i++) { for (int j=0; j<7; j++) { Array[i][j]=0; Array[i][j]=rand() %500+1; } } } void showArray(int Array [][7]) { cout <<"\nArray Elements.....\n\n\n"; for (int i=0; i<7; i++) { for (int j=0; j<7; j++) { cout << Array[i][j] <<'\t' ; } cout << endl ; } } void FindEvenNumber(int Array [][7]) { cout <<"\n\nEven Number.......\n\n\n"; for (int i=0; i<7; i++) { for (int j=0; j<7; j++) { if (Array [i][j] %2==0) { cout << Array [i][j] <<'\t' ; } } } }

CS201 Assignment Solution Download Link

Download

If CS201 Assignment Solution provided by (Virtual Study Solutions) was helpful. Please Share it with your friends. You can also like our Facebook Page or Subscribe Us below for Updates. Thank You.

One thought on “Cs201 Assignment No 3 Solution 2013

Leave a comment

L'indirizzo email non verrĂ  pubblicato. I campi obbligatori sono contrassegnati *