Assignment No. 2 Semester: Fall 2019 CS201 – Introduction to Programming |
Total Marks: 20
Due Date: 02-12-2019 |
||
Instructions Please read the following instructions carefully before submitting assignment: It should be clear that your assignment will not get any credit if:
o Assignment is submitted after due date. o Submitted assignment does not open or file is corrupt. o Assignment is copied (From internet/students).
Software allowed to develop Assignment
- Dev C++
Objectives: In this assignment, the students will learn:
Assignment Submission Instructions You are required to submit only .cpp file on the assignments interface of CS201 at VU-LMS. Assignment submitted in any other format will not be accepted and will be graded zero marks.
|
|||
Lectures Covered: This assignment covers Lecture # 11-15. Deadline: The deadline to submit your assignment solution is 02-12-2019. Your assignment must be submitted within the due date through VU-LMS. No assignment will be accepted through email after the due date. |
|
Tags:
Please Discuss here about this assignment.Thanks
Our main purpose here discussion not just Solution
Students having same subject can start discussion here to solve assignment, GDB & Quiz and can clear their concepts until solution is provided.
P.S: Please always try to add the discussion in proper format title like “CS101 Assignment / GDB No 01 Solution & Discussion Due Date: ___________”
Then copy Questions from assignment file and paste in Discussion.
+ http://bit.ly/vucodes (For Assignments, GDBs & Online Quizzes Solution)
+ http://bit.ly/papersvu (For Past Papers, Solved MCQs, Short Notes & More)
+ Click Here to Search (Looking For something at vustudents.ning.com?)
+ Click Here to Join (Our facebook study Group)
CS201_Assignmnet_2_Solution_Fall_2019_vustudents.ning.com
link below
CS201_Assignmnet_2_Solution_Fall_2019_vustudents.ning.com.docx
CS201 Assignment no 02 Solution fall 2019
below link
CS201_Assignmnet_2_Solution_Fall_2019_vustudents.ning.com.cpp
CS201 Assignment No 02 Solution fall 2019
below link
https://drive.google.com/file/d/1WzXfXL_5G5_enSWUA7rICpn0nlgVqFcW/view
Complete
Thanks for sharing too all^_^...
CS201 ASSIGNMENT NO.2 Solution
# include <iostream>
# include <stdlib.h>
# include <cstdlib>
# include <ctime>
Using name space Std;
Int multiArray [10][10];
Int rows=10;
Int cols=10;
Int chk=0;
Void populateArray(){
srand (time(time));
for(int i=0; i< rows;i++){
for(int j=0; I < cols;++){
multiArray[i][j]= (rand()%100) + 1;
}
}
cout ” A 2-Dimensional Array is created successfully…! \n”;
};
Void showElements(){
If (multiArray [chk][chk]==0{
cout ” Sorry! Array is empty, Please first fill it by chosing option\\n”;
}
else {
cout ” Array is given below…!\n”;
cout _ _ _ _ _ _ _ _********_ _ _ _ _ _ _ _********_ _ _ _ _ _ _ _\n”;
for (int i=0; I < rows; i++){
cout ” l tc” i+ l;
}
cout ”\n”;
for(int i=0 ; I < rows; i++){
cout ‘’R’’ i+1 ’’\t”;
for(int ;=0; I < cols; j++){
cout transposed Array [i][j] ”|t”;
}
cout ”|n”;
}
}
};
Void showLargestElement(){
Int temp;
Int max=0;
Int rowNum; colNum;
If (multiArray [chk][chk]==0){
cout ” Sorry ! Array is empty , Please first fill it by chosing 1\n”;
}
else{
for(int i=0; i< rows; i++){
for(int j=0; j < cols ; j++){
temp=multiArray[i][j];
If(max <= temp){
max = temp;
rowNum=i+l;
colNum = i+l;
}
}
}
cout ”Maximum number of the Array ‘’ max ’’ is at :
At (R” rowNum ” , c: colNum ”)\n”;
}
};
Void transposedArray(){
Int transposed Array [10][10];
If (multiArray [chk][chk]==0){
cout ” Sorry Array is empty, Please first fill it by chosing option 1\n”;
}
Else {
for(int i=0; < rows; i++){
for(int j=0; j < cols; j++){
transposed Array [j][i]= multi Array[i][j];
}
}
cout ” Transposed Array is given below …!\n”;
cout ” _ _ _ _ _ _ _ _******** _ _ _ _ _ _ _ _******** _ _ _ _ _ _ _ _\n”;
for(int i=0; I < rowa; i++){
cout ”\tc” i+1;
}
cout ‘’\n’’;
for(int i=0 ; I < rows; i++){
cout ‘’R’’ i+1 ’’\t”;
for(int ;=0; I < cols; j++){
cout transposed Array [i][j] ”\t”;
}
cout ”\n”;
}
}
};
While (is True){
cout ” _ _ _ _ _ _ _ _******** _ _ _ _ _ _ _ _******** _ _ _ _ _ _ _ _\n”;
cout ”\n\ tplease enter a number (1-4) to …!\”;
cout ”\t1: PoPulate a 2- Diemesional Array with integers (1-100)\n”;
cout ”\t2: Display the elements of the 2-dimensional Array\n”;
cout ”\t3:Display the largest element with its row and colum I \n”;
cout ”\t4:Find and show the transpose of the Array \n\n”;
cout ” _ _ _ _ _ _ _ _******** _ _ _ _ _ _ _ _******** _ _ _ _ _ _ _ _\n”;
cin >> toDo;
cout ”\t your choice is == >” to Do ”|”;
Switch (to Do){
}
Return 0;
}
CS201_Assignmnet_2_Solution_Fall_2019_vustudents.ning.com
link below
CS201_Assignmnet_2_Solution_Fall_2019_vustudents.ning.com.docx
© 2021 Created by + M.Tariq Malik.
Powered by
Promote Us | Report an Issue | Privacy Policy | Terms of Service
We non-commercial site working hard since 2009 to facilitate learning Read More. We can't keep up without your support. Donate.
We are user-generated contents & non-commercial site. All product, videos, pictures & others contents on site don't seem to be beneath our Copyrights & belong to their respected owners & freely available on public domains. All Contents on site are for personal & non-commercial use.We believe in Our Policy & do according to them. If Any content is offensive in your Copyrights then please email at m.tariqmalik@gmail.com with copyright detail & We will happy to remove it immediately.
Management: Admins ::: Moderators
Awards Badges List | Moderators Group
All Members | Featured Members | Top Reputation Members | Angels Members | Intellectual Members | Criteria for Selection
Become a Team Member | Safety Guidelines for New | Site FAQ & Rules | Safety Matters | Online Safety | Rules For Blog Post