SlideShare a Scribd company logo
The Programs
Sum Of MatricesSum Of Matrices
Product Of Matrices
cout<<"Enter second matrix rowcout<<"Enter second matrix row
wise";wise";
for(i = 0; i<p; ++i)for(i = 0; i<p; ++i)
for(j = 0; j<q; ++j)for(j = 0; j<q; ++j)
cin>>B[i][j];cin>>B[i][j];
cout<<“product of the givencout<<“product of the given
two matrix is : “;two matrix is : “;
for(i = 0; i<m; ++i)for(i = 0; i<m; ++i)
{ cout<<“n”;{ cout<<“n”;
for(j = 0; j<n; ++j)for(j = 0; j<n; ++j)
{ C[i][j] = 0;{ C[i][j] = 0;
C[i][j] = C[i][j] + A[i][k] * B[k]C[i][j] = C[i][j] + A[i][k] * B[k]
[j];[j];
cout<< C[i][j] << “ “;cout<< C[i][j] << “ “;
}} }} }}
elseelse
cout<<“n the matrices are notcout<<“n the matrices are not
compatible for multiplication “;compatible for multiplication “;
getch();getch();
}}
Linear Search
Palindrome(string)
Stats of text
#include<iostream.h>
#include<conio.h>
#include<process.h>
void textstat( char str[], int &lc, int &wc, int &cc);
void main()
{ clrscr();
char str[255] = “ Hi how are you !! ”;
int lc, wc, cc;
cout<<“n Enter any string (~ to terminate) : “;
cin.getline(str, 255,’~’)
textstat(str, lc, wc, cc);
cout<< “number of lines in the string are: “<< lc;
cout<< “number of words in the string are: “<< wc;
cout<< “number of characters in the string are: “<< cc;
getch();
}
int wordcount(char str[])
{ int count = 1;
for (int i = 0; str[i] ‘0’; ++i)
{ if (str[i] == ‘i’ || str[i] == ‘n’)
{count ++;
while (str[i] ==‘ ‘)
i++; }
if (str[i]==‘0’)
i--;
}
return count;
}
int charcount(char str[])
int count = 0;
for (int i = 0; str[i] ‘0’; ++i)
count++;
return count;
}
int linecount(char str[])
{ int count = 1;
for (int i = 0; str[i] ‘0’; ++i)
if(str[i]==‘n’)
count++;
return count;
}
void textstat( char str[], int &lc, int &wc, int &cc)
{ lc = linecount(str);
wc = wordcount(str);
cc = charcount(str);
}
Nested structures#include<iostream.h>
#include<conio.h>
#include<stdio.h>
struct addr
{ int houseno;
char area[25];
char city[25];
char state[25];
};
struct emp
{
int empno;
char name[25];
char desig[25];
addr address;
float basic;
} worker;
int main ()
{ clrscr();
cout<<" n Enter employee number:"
cin>>worker.empno;
cout<<" n Enter name:"
gets(worker.name);
cout<<" n Enter Designation:"
gets(worker.desig);
cout<<" n Enter House no. :"
gets(worker.address.houseno);
cout<<" n Enter Area"
gets(worker.address.area);
cout<<" n Enter city
getsworker.address.city);
cout<<" n Enter state"
gets(worker.address.state);
cout<<" n Enter Basic pay "
cin>>worker.basic;
return0;
}
Student’s Result#include<iostream.h>
#include<conio.h>
#include<stdio.h>
struct student
{
int rollno;
char name[25];
float marks;
char grade;
};
student learner;
void main ()
{
clrscr();
cout<<" n Enter roll number:"
cin>>learner.rollno;
cout<<" n Enter name:"
gets(learner.name);
cout<<" n marks in 5 subjects:"
for (int i = 0;i < 5 ; ++i)
{
cout<<"Subject"<< i + 1 <<": ";
cin>>learner.marks[i];
}
float avg, total = 0;
for (int i = 0;i < 5 ; ++i)
total += sum[i];
avg = total/ 5;
if (avg < 50) learner.grade = 'F';
else if (avg < 60) learner.grade = 'C';
else if (avg < 80) learner.grade = 'B';
else lerner.grade = 'A'
cout<<" n Student's Result :"
cout<<" n roll number :"<<learner.rollno;
cout<<" n Name :'
puts(learner.name);
cout<<" n Total marks :"<< total;
cout<<" n Grade :"<<learner.grade <<endl;
}
cout<<" n Enter Basic pay "
cin>>worker.basic;
return 0;
}
Equality of strings
The later Date
#include<iostream.h>#include<iostream.h>
#include<conio.h>#include<conio.h>
#include<process.h>#include<process.h>
#include<stdio.h>#include<stdio.h>
date later( dateS1, dateS2);date later( dateS1, dateS2);
void main()void main()
{ clrscr();{ clrscr();
struct date { int day;struct date { int day;
int month;int month;
int year;int year;
}d1, d2;}d1, d2;
cout<<"enterfirst date";cout<<"enterfirst date";
cout<<"enterday";cout<<"enterday";
gets(d1.day);gets(d1.day);
cout<<"entermonth";cout<<"entermonth";
gets(d1.month);gets(d1.month);
cout<<"enteryear";cout<<"enteryear";
gets(d1.year);gets(d1.year);
cout<<"n";cout<<"n";
cout<<"entersecond date";cout<<"entersecond date";
cout<<"enterday";cout<<"enterday";
gets(d2.day);gets(d2.day);
cout<<"entermonth";cout<<"entermonth";
gets(d2.month);gets(d2.month);
cout<<"enteryear";cout<<"enteryear";
gets(d2.year);gets(d2.year);
date later(date S1, date S2)date later(date S1, date S2)
getch();getch();
}}
date later(date S1, date S2)date later(date S1, date S2)
{{
if (S2.year> S1.year)if (S2.year> S1.year)
cout<< S2;cout<< S2;
else if (S1.year> S2.year)else if (S1.year> S2.year)
cout<< S1;cout<< S1;
else if (S1.month > S2.month)else if (S1.month > S2.month)
cout<< S1;cout<< S1;
else if (S1.month < S2.month)else if (S1.month < S2.month)
cout<< S2;cout<< S2;
else if (S2.day > S1.day)else if (S2.day > S1.day)
cout<< S2;cout<< S2;
elseelse
cout<< S1;cout<< S1;
}}
CBSE Class XI Programming in C++

More Related Content

What's hot

Diff between c and c++
Diff between c and c++Diff between c and c++
Diff between c and c++
VishrudhMamidala
 
Introduction to c++
Introduction to c++Introduction to c++
Introduction to c++
somu rajesh
 
18 dec pointers and scope resolution operator
18 dec pointers and scope resolution operator18 dec pointers and scope resolution operator
18 dec pointers and scope resolution operatorSAFFI Ud Din Ahmad
 
C++ functions presentation by DHEERAJ KATARIA
C++ functions presentation by DHEERAJ KATARIAC++ functions presentation by DHEERAJ KATARIA
C++ functions presentation by DHEERAJ KATARIA
Dheeraj Kataria
 
Basic c++ programs
Basic c++ programsBasic c++ programs
Basic c++ programs
harman kaur
 
Programming Fundamentals Arrays and Strings
Programming Fundamentals   Arrays and Strings Programming Fundamentals   Arrays and Strings
Programming Fundamentals Arrays and Strings
imtiazalijoono
 
Cs1123 3 c++ overview
Cs1123 3 c++ overviewCs1123 3 c++ overview
Cs1123 3 c++ overviewTAlha MAlik
 
Introduction to c++
Introduction to c++Introduction to c++
Introduction to c++
Himanshu Kaushik
 
Introduction to cpp
Introduction to cppIntroduction to cpp
Introduction to cpp
Nilesh Dalvi
 
C++ Functions
C++ FunctionsC++ Functions
C++ Functions
sathish sak
 
Introduction to C++
Introduction to C++Introduction to C++
Introduction to C++
Sikder Tahsin Al-Amin
 
C++ functions
C++ functionsC++ functions
C++ functions
Mayank Jain
 
Advanced C - Part 2
Advanced C - Part 2Advanced C - Part 2
C++ programming function
C++ programming functionC++ programming function
C++ programming function
Vishalini Mugunen
 
C++ functions
C++ functionsC++ functions
C++ functions
Dawood Jutt
 
Learning C++ - Functions in C++ 3
Learning C++ - Functions  in C++ 3Learning C++ - Functions  in C++ 3
Learning C++ - Functions in C++ 3
Ali Aminian
 
C++
C++C++
C++ Language
C++ LanguageC++ Language
C++ Language
Syed Zaid Irshad
 
Functions in C++
Functions in C++Functions in C++
Functions in C++
Pranali Chaudhari
 
Function overloading(C++)
Function overloading(C++)Function overloading(C++)
Function overloading(C++)
Ritika Sharma
 

What's hot (20)

Diff between c and c++
Diff between c and c++Diff between c and c++
Diff between c and c++
 
Introduction to c++
Introduction to c++Introduction to c++
Introduction to c++
 
18 dec pointers and scope resolution operator
18 dec pointers and scope resolution operator18 dec pointers and scope resolution operator
18 dec pointers and scope resolution operator
 
C++ functions presentation by DHEERAJ KATARIA
C++ functions presentation by DHEERAJ KATARIAC++ functions presentation by DHEERAJ KATARIA
C++ functions presentation by DHEERAJ KATARIA
 
Basic c++ programs
Basic c++ programsBasic c++ programs
Basic c++ programs
 
Programming Fundamentals Arrays and Strings
Programming Fundamentals   Arrays and Strings Programming Fundamentals   Arrays and Strings
Programming Fundamentals Arrays and Strings
 
Cs1123 3 c++ overview
Cs1123 3 c++ overviewCs1123 3 c++ overview
Cs1123 3 c++ overview
 
Introduction to c++
Introduction to c++Introduction to c++
Introduction to c++
 
Introduction to cpp
Introduction to cppIntroduction to cpp
Introduction to cpp
 
C++ Functions
C++ FunctionsC++ Functions
C++ Functions
 
Introduction to C++
Introduction to C++Introduction to C++
Introduction to C++
 
C++ functions
C++ functionsC++ functions
C++ functions
 
Advanced C - Part 2
Advanced C - Part 2Advanced C - Part 2
Advanced C - Part 2
 
C++ programming function
C++ programming functionC++ programming function
C++ programming function
 
C++ functions
C++ functionsC++ functions
C++ functions
 
Learning C++ - Functions in C++ 3
Learning C++ - Functions  in C++ 3Learning C++ - Functions  in C++ 3
Learning C++ - Functions in C++ 3
 
C++
C++C++
C++
 
C++ Language
C++ LanguageC++ Language
C++ Language
 
Functions in C++
Functions in C++Functions in C++
Functions in C++
 
Function overloading(C++)
Function overloading(C++)Function overloading(C++)
Function overloading(C++)
 

Viewers also liked

Multidimensional arrays in C++
Multidimensional arrays in C++Multidimensional arrays in C++
Multidimensional arrays in C++
Ilio Catallo
 
Overview of c++
Overview of c++Overview of c++
Overview of c++geeeeeet
 
Understand Decision structures in c++ (cplusplus)
Understand Decision structures in c++ (cplusplus)Understand Decision structures in c++ (cplusplus)
Understand Decision structures in c++ (cplusplus)
Muhammad Tahir Bashir
 
Overview of c++ language
Overview of c++ language   Overview of c++ language
Overview of c++ language
samt7
 
Learn c++ Programming Language
Learn c++ Programming LanguageLearn c++ Programming Language
Learn c++ Programming Language
Steve Johnson
 
Revision notes for exam 2011 computer science with C++
Revision notes for exam 2011 computer science with C++Revision notes for exam 2011 computer science with C++
Revision notes for exam 2011 computer science with C++
Deepak Singh
 
Structure of C++ - R.D.Sivakumar
Structure of C++ - R.D.SivakumarStructure of C++ - R.D.Sivakumar
Structure of C++ - R.D.Sivakumar
Sivakumar R D .
 
c++ programming Unit 2 basic structure of a c++ program
c++ programming Unit 2 basic structure of a c++ programc++ programming Unit 2 basic structure of a c++ program
c++ programming Unit 2 basic structure of a c++ program
AAKASH KUMAR
 
Arrays In C++
Arrays In C++Arrays In C++
Arrays In C++
Awais Alam
 
CS101- Introduction to Computing- Lecture 26
CS101- Introduction to Computing- Lecture 26CS101- Introduction to Computing- Lecture 26
CS101- Introduction to Computing- Lecture 26
Bilal Ahmed
 

Viewers also liked (11)

Multidimensional arrays in C++
Multidimensional arrays in C++Multidimensional arrays in C++
Multidimensional arrays in C++
 
Overview of c++
Overview of c++Overview of c++
Overview of c++
 
Understand Decision structures in c++ (cplusplus)
Understand Decision structures in c++ (cplusplus)Understand Decision structures in c++ (cplusplus)
Understand Decision structures in c++ (cplusplus)
 
Overview of c++ language
Overview of c++ language   Overview of c++ language
Overview of c++ language
 
Learn c++ Programming Language
Learn c++ Programming LanguageLearn c++ Programming Language
Learn c++ Programming Language
 
Revision notes for exam 2011 computer science with C++
Revision notes for exam 2011 computer science with C++Revision notes for exam 2011 computer science with C++
Revision notes for exam 2011 computer science with C++
 
Structure of C++ - R.D.Sivakumar
Structure of C++ - R.D.SivakumarStructure of C++ - R.D.Sivakumar
Structure of C++ - R.D.Sivakumar
 
Structure in c
Structure in cStructure in c
Structure in c
 
c++ programming Unit 2 basic structure of a c++ program
c++ programming Unit 2 basic structure of a c++ programc++ programming Unit 2 basic structure of a c++ program
c++ programming Unit 2 basic structure of a c++ program
 
Arrays In C++
Arrays In C++Arrays In C++
Arrays In C++
 
CS101- Introduction to Computing- Lecture 26
CS101- Introduction to Computing- Lecture 26CS101- Introduction to Computing- Lecture 26
CS101- Introduction to Computing- Lecture 26
 

Similar to CBSE Class XI Programming in C++

54602399 c-examples-51-to-108-programe-ee01083101
54602399 c-examples-51-to-108-programe-ee0108310154602399 c-examples-51-to-108-programe-ee01083101
54602399 c-examples-51-to-108-programe-ee01083101
premrings
 
Pads lab manual final
Pads lab manual finalPads lab manual final
Pads lab manual final
AhalyaR
 
Cs pritical file
Cs pritical fileCs pritical file
Cs pritical file
Mitul Patel
 
2014 computer science_question_paper
2014 computer science_question_paper2014 computer science_question_paper
2014 computer science_question_paper
vandna123
 
12th CBSE Practical File
12th CBSE Practical File12th CBSE Practical File
12th CBSE Practical File
Ashwin Francis
 
.net progrmming part2
.net progrmming part2.net progrmming part2
.net progrmming part2
Dr.M.Karthika parthasarathy
 
Oops practical file
Oops practical fileOops practical file
Oops practical fileAnkit Dixit
 
Oops lab manual2
Oops lab manual2Oops lab manual2
Oops lab manual2
Mouna Guru
 
C++ practical
C++ practicalC++ practical
C++ practical
Rahul juneja
 
C++ file
C++ fileC++ file
C++ TUTORIAL 5
C++ TUTORIAL 5C++ TUTORIAL 5
C++ TUTORIAL 5
Farhan Ab Rahman
 
C++ ARRAY WITH EXAMPLES
C++ ARRAY WITH EXAMPLESC++ ARRAY WITH EXAMPLES
C++ ARRAY WITH EXAMPLES
Farhan Ab Rahman
 
2 BytesC++ course_2014_c3_ function basics&parameters and overloading
2 BytesC++ course_2014_c3_ function basics&parameters and overloading2 BytesC++ course_2014_c3_ function basics&parameters and overloading
2 BytesC++ course_2014_c3_ function basics&parameters and overloading
kinan keshkeh
 
Practical Class 12th (c++programs+sql queries and output)
Practical Class 12th (c++programs+sql queries and output)Practical Class 12th (c++programs+sql queries and output)
Practical Class 12th (c++programs+sql queries and output)
Aman Deep
 
Practical Class 12th (c++programs+sql queries and output)
Practical Class 12th (c++programs+sql queries and output) Practical Class 12th (c++programs+sql queries and output)
Practical Class 12th (c++programs+sql queries and output)
Aman Deep
 
java experiments and programs
java experiments and programsjava experiments and programs
java experiments and programs
Karuppaiyaa123
 

Similar to CBSE Class XI Programming in C++ (20)

54602399 c-examples-51-to-108-programe-ee01083101
54602399 c-examples-51-to-108-programe-ee0108310154602399 c-examples-51-to-108-programe-ee01083101
54602399 c-examples-51-to-108-programe-ee01083101
 
Pads lab manual final
Pads lab manual finalPads lab manual final
Pads lab manual final
 
Cs pritical file
Cs pritical fileCs pritical file
Cs pritical file
 
2014 computer science_question_paper
2014 computer science_question_paper2014 computer science_question_paper
2014 computer science_question_paper
 
12th CBSE Practical File
12th CBSE Practical File12th CBSE Practical File
12th CBSE Practical File
 
.net progrmming part2
.net progrmming part2.net progrmming part2
.net progrmming part2
 
Oops practical file
Oops practical fileOops practical file
Oops practical file
 
C++ file
C++ fileC++ file
C++ file
 
C++ file
C++ fileC++ file
C++ file
 
Bijender (1)
Bijender (1)Bijender (1)
Bijender (1)
 
Oops lab manual2
Oops lab manual2Oops lab manual2
Oops lab manual2
 
C++ practical
C++ practicalC++ practical
C++ practical
 
C++ file
C++ fileC++ file
C++ file
 
C++ TUTORIAL 5
C++ TUTORIAL 5C++ TUTORIAL 5
C++ TUTORIAL 5
 
C++ ARRAY WITH EXAMPLES
C++ ARRAY WITH EXAMPLESC++ ARRAY WITH EXAMPLES
C++ ARRAY WITH EXAMPLES
 
2 BytesC++ course_2014_c3_ function basics&parameters and overloading
2 BytesC++ course_2014_c3_ function basics&parameters and overloading2 BytesC++ course_2014_c3_ function basics&parameters and overloading
2 BytesC++ course_2014_c3_ function basics&parameters and overloading
 
Practical Class 12th (c++programs+sql queries and output)
Practical Class 12th (c++programs+sql queries and output)Practical Class 12th (c++programs+sql queries and output)
Practical Class 12th (c++programs+sql queries and output)
 
Practical Class 12th (c++programs+sql queries and output)
Practical Class 12th (c++programs+sql queries and output) Practical Class 12th (c++programs+sql queries and output)
Practical Class 12th (c++programs+sql queries and output)
 
Include
IncludeInclude
Include
 
java experiments and programs
java experiments and programsjava experiments and programs
java experiments and programs
 

More from Pranav Ghildiyal

Lasers
LasersLasers
Global warming :- A PowerPoint Presentation
Global warming :- A PowerPoint PresentationGlobal warming :- A PowerPoint Presentation
Global warming :- A PowerPoint Presentation
Pranav Ghildiyal
 
A Report On Disaster Management
A Report On Disaster ManagementA Report On Disaster Management
A Report On Disaster Management
Pranav Ghildiyal
 
Recycle and reuse of everyday material
Recycle and reuse of everyday materialRecycle and reuse of everyday material
Recycle and reuse of everyday material
Pranav Ghildiyal
 
Word of the day (may)
Word of  the day (may)Word of  the day (may)
Word of the day (may)
Pranav Ghildiyal
 
Boost your knowledge
Boost your knowledgeBoost your knowledge
Boost your knowledge
Pranav Ghildiyal
 
CBSE Class XII Comp sc practical file
CBSE Class XII Comp sc practical fileCBSE Class XII Comp sc practical file
CBSE Class XII Comp sc practical file
Pranav Ghildiyal
 
CBSE Class XII physics practical project on Metal detector
CBSE Class XII physics practical project on Metal detectorCBSE Class XII physics practical project on Metal detector
CBSE Class XII physics practical project on Metal detector
Pranav Ghildiyal
 
CBSE Class XII practical project on Rayon threads
CBSE Class XII practical project on Rayon threadsCBSE Class XII practical project on Rayon threads
CBSE Class XII practical project on Rayon threadsPranav Ghildiyal
 
CBSE Class X Rise of nationalism in europe
CBSE Class X Rise of nationalism in europeCBSE Class X Rise of nationalism in europe
CBSE Class X Rise of nationalism in europe
Pranav Ghildiyal
 
H1 n1 swine flu
H1 n1 swine fluH1 n1 swine flu
H1 n1 swine flu
Pranav Ghildiyal
 
CBSE Class IX Social Studies ECONOMICS Poverty as a challenge
CBSE Class IX Social Studies ECONOMICS Poverty as a challengeCBSE Class IX Social Studies ECONOMICS Poverty as a challenge
CBSE Class IX Social Studies ECONOMICS Poverty as a challenge
Pranav Ghildiyal
 
CBSE Class IX Sciense Physics Sound
CBSE Class IX Sciense Physics SoundCBSE Class IX Sciense Physics Sound
CBSE Class IX Sciense Physics Sound
Pranav Ghildiyal
 
CBSE Class IX Chemistry Natural resources
CBSE Class IX Chemistry Natural resourcesCBSE Class IX Chemistry Natural resources
CBSE Class IX Chemistry Natural resources
Pranav Ghildiyal
 
CBSE Class IX SCIENCE CHEMISTRY Is matter around us pure
CBSE Class IX SCIENCE CHEMISTRY Is matter around us pureCBSE Class IX SCIENCE CHEMISTRY Is matter around us pure
CBSE Class IX SCIENCE CHEMISTRY Is matter around us pure
Pranav Ghildiyal
 
CBSE Class X Chemical reactions and equations
CBSE Class X Chemical reactions and equationsCBSE Class X Chemical reactions and equations
CBSE Class X Chemical reactions and equations
Pranav Ghildiyal
 
CBSE Class XI Chemistry :- Organic chemistry (Basics)
CBSE Class XI Chemistry :- Organic chemistry (Basics)CBSE Class XI Chemistry :- Organic chemistry (Basics)
CBSE Class XI Chemistry :- Organic chemistry (Basics)
Pranav Ghildiyal
 
CBSE Class XI Maths Arthmetic progression
CBSE Class XI Maths Arthmetic progressionCBSE Class XI Maths Arthmetic progression
CBSE Class XI Maths Arthmetic progression
Pranav Ghildiyal
 
CBSE Class XI Maths Linear inequalities
CBSE Class XI Maths Linear inequalitiesCBSE Class XI Maths Linear inequalities
CBSE Class XI Maths Linear inequalities
Pranav Ghildiyal
 

More from Pranav Ghildiyal (20)

Lasers
LasersLasers
Lasers
 
Global warming :- A PowerPoint Presentation
Global warming :- A PowerPoint PresentationGlobal warming :- A PowerPoint Presentation
Global warming :- A PowerPoint Presentation
 
A Report On Disaster Management
A Report On Disaster ManagementA Report On Disaster Management
A Report On Disaster Management
 
Recycle and reuse of everyday material
Recycle and reuse of everyday materialRecycle and reuse of everyday material
Recycle and reuse of everyday material
 
Word of the day (may)
Word of  the day (may)Word of  the day (may)
Word of the day (may)
 
Boost your knowledge
Boost your knowledgeBoost your knowledge
Boost your knowledge
 
CBSE Class XII Comp sc practical file
CBSE Class XII Comp sc practical fileCBSE Class XII Comp sc practical file
CBSE Class XII Comp sc practical file
 
CBSE Class XII physics practical project on Metal detector
CBSE Class XII physics practical project on Metal detectorCBSE Class XII physics practical project on Metal detector
CBSE Class XII physics practical project on Metal detector
 
CBSE Class XII practical project on Rayon threads
CBSE Class XII practical project on Rayon threadsCBSE Class XII practical project on Rayon threads
CBSE Class XII practical project on Rayon threads
 
Shopping mall
Shopping mallShopping mall
Shopping mall
 
CBSE Class X Rise of nationalism in europe
CBSE Class X Rise of nationalism in europeCBSE Class X Rise of nationalism in europe
CBSE Class X Rise of nationalism in europe
 
H1 n1 swine flu
H1 n1 swine fluH1 n1 swine flu
H1 n1 swine flu
 
CBSE Class IX Social Studies ECONOMICS Poverty as a challenge
CBSE Class IX Social Studies ECONOMICS Poverty as a challengeCBSE Class IX Social Studies ECONOMICS Poverty as a challenge
CBSE Class IX Social Studies ECONOMICS Poverty as a challenge
 
CBSE Class IX Sciense Physics Sound
CBSE Class IX Sciense Physics SoundCBSE Class IX Sciense Physics Sound
CBSE Class IX Sciense Physics Sound
 
CBSE Class IX Chemistry Natural resources
CBSE Class IX Chemistry Natural resourcesCBSE Class IX Chemistry Natural resources
CBSE Class IX Chemistry Natural resources
 
CBSE Class IX SCIENCE CHEMISTRY Is matter around us pure
CBSE Class IX SCIENCE CHEMISTRY Is matter around us pureCBSE Class IX SCIENCE CHEMISTRY Is matter around us pure
CBSE Class IX SCIENCE CHEMISTRY Is matter around us pure
 
CBSE Class X Chemical reactions and equations
CBSE Class X Chemical reactions and equationsCBSE Class X Chemical reactions and equations
CBSE Class X Chemical reactions and equations
 
CBSE Class XI Chemistry :- Organic chemistry (Basics)
CBSE Class XI Chemistry :- Organic chemistry (Basics)CBSE Class XI Chemistry :- Organic chemistry (Basics)
CBSE Class XI Chemistry :- Organic chemistry (Basics)
 
CBSE Class XI Maths Arthmetic progression
CBSE Class XI Maths Arthmetic progressionCBSE Class XI Maths Arthmetic progression
CBSE Class XI Maths Arthmetic progression
 
CBSE Class XI Maths Linear inequalities
CBSE Class XI Maths Linear inequalitiesCBSE Class XI Maths Linear inequalities
CBSE Class XI Maths Linear inequalities
 

Recently uploaded

Thesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.pptThesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.ppt
EverAndrsGuerraGuerr
 
Aficamten in HCM (SEQUOIA HCM TRIAL 2024)
Aficamten in HCM (SEQUOIA HCM TRIAL 2024)Aficamten in HCM (SEQUOIA HCM TRIAL 2024)
Aficamten in HCM (SEQUOIA HCM TRIAL 2024)
Ashish Kohli
 
MERN Stack Developer Roadmap By ScholarHat PDF
MERN Stack Developer Roadmap By ScholarHat PDFMERN Stack Developer Roadmap By ScholarHat PDF
MERN Stack Developer Roadmap By ScholarHat PDF
scholarhattraining
 
PCOS corelations and management through Ayurveda.
PCOS corelations and management through Ayurveda.PCOS corelations and management through Ayurveda.
PCOS corelations and management through Ayurveda.
Dr. Shivangi Singh Parihar
 
DRUGS AND ITS classification slide share
DRUGS AND ITS classification slide shareDRUGS AND ITS classification slide share
DRUGS AND ITS classification slide share
taiba qazi
 
CACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdfCACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdf
camakaiclarkmusic
 
Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.
Ashokrao Mane college of Pharmacy Peth-Vadgaon
 
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptxChapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
Mohd Adib Abd Muin, Senior Lecturer at Universiti Utara Malaysia
 
Advantages and Disadvantages of CMS from an SEO Perspective
Advantages and Disadvantages of CMS from an SEO PerspectiveAdvantages and Disadvantages of CMS from an SEO Perspective
Advantages and Disadvantages of CMS from an SEO Perspective
Krisztián Száraz
 
"Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe..."Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe...
SACHIN R KONDAGURI
 
Reflective and Evaluative Practice PowerPoint
Reflective and Evaluative Practice PowerPointReflective and Evaluative Practice PowerPoint
Reflective and Evaluative Practice PowerPoint
amberjdewit93
 
Azure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHatAzure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHat
Scholarhat
 
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Dr. Vinod Kumar Kanvaria
 
How to Build a Module in Odoo 17 Using the Scaffold Method
How to Build a Module in Odoo 17 Using the Scaffold MethodHow to Build a Module in Odoo 17 Using the Scaffold Method
How to Build a Module in Odoo 17 Using the Scaffold Method
Celine George
 
Natural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama UniversityNatural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama University
Akanksha trivedi rama nursing college kanpur.
 
A Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in EducationA Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in Education
Peter Windle
 
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdfবাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
eBook.com.bd (প্রয়োজনীয় বাংলা বই)
 
A Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptxA Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptx
thanhdowork
 
Best Digital Marketing Institute In NOIDA
Best Digital Marketing Institute In NOIDABest Digital Marketing Institute In NOIDA
Best Digital Marketing Institute In NOIDA
deeptiverma2406
 
What is the purpose of studying mathematics.pptx
What is the purpose of studying mathematics.pptxWhat is the purpose of studying mathematics.pptx
What is the purpose of studying mathematics.pptx
christianmathematics
 

Recently uploaded (20)

Thesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.pptThesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.ppt
 
Aficamten in HCM (SEQUOIA HCM TRIAL 2024)
Aficamten in HCM (SEQUOIA HCM TRIAL 2024)Aficamten in HCM (SEQUOIA HCM TRIAL 2024)
Aficamten in HCM (SEQUOIA HCM TRIAL 2024)
 
MERN Stack Developer Roadmap By ScholarHat PDF
MERN Stack Developer Roadmap By ScholarHat PDFMERN Stack Developer Roadmap By ScholarHat PDF
MERN Stack Developer Roadmap By ScholarHat PDF
 
PCOS corelations and management through Ayurveda.
PCOS corelations and management through Ayurveda.PCOS corelations and management through Ayurveda.
PCOS corelations and management through Ayurveda.
 
DRUGS AND ITS classification slide share
DRUGS AND ITS classification slide shareDRUGS AND ITS classification slide share
DRUGS AND ITS classification slide share
 
CACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdfCACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdf
 
Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.
 
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptxChapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
 
Advantages and Disadvantages of CMS from an SEO Perspective
Advantages and Disadvantages of CMS from an SEO PerspectiveAdvantages and Disadvantages of CMS from an SEO Perspective
Advantages and Disadvantages of CMS from an SEO Perspective
 
"Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe..."Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe...
 
Reflective and Evaluative Practice PowerPoint
Reflective and Evaluative Practice PowerPointReflective and Evaluative Practice PowerPoint
Reflective and Evaluative Practice PowerPoint
 
Azure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHatAzure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHat
 
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
 
How to Build a Module in Odoo 17 Using the Scaffold Method
How to Build a Module in Odoo 17 Using the Scaffold MethodHow to Build a Module in Odoo 17 Using the Scaffold Method
How to Build a Module in Odoo 17 Using the Scaffold Method
 
Natural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama UniversityNatural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama University
 
A Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in EducationA Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in Education
 
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdfবাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
 
A Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptxA Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptx
 
Best Digital Marketing Institute In NOIDA
Best Digital Marketing Institute In NOIDABest Digital Marketing Institute In NOIDA
Best Digital Marketing Institute In NOIDA
 
What is the purpose of studying mathematics.pptx
What is the purpose of studying mathematics.pptxWhat is the purpose of studying mathematics.pptx
What is the purpose of studying mathematics.pptx
 

CBSE Class XI Programming in C++

  • 1.
  • 3. Sum Of MatricesSum Of Matrices
  • 4. Product Of Matrices cout<<"Enter second matrix rowcout<<"Enter second matrix row wise";wise"; for(i = 0; i<p; ++i)for(i = 0; i<p; ++i) for(j = 0; j<q; ++j)for(j = 0; j<q; ++j) cin>>B[i][j];cin>>B[i][j]; cout<<“product of the givencout<<“product of the given two matrix is : “;two matrix is : “; for(i = 0; i<m; ++i)for(i = 0; i<m; ++i) { cout<<“n”;{ cout<<“n”; for(j = 0; j<n; ++j)for(j = 0; j<n; ++j) { C[i][j] = 0;{ C[i][j] = 0; C[i][j] = C[i][j] + A[i][k] * B[k]C[i][j] = C[i][j] + A[i][k] * B[k] [j];[j]; cout<< C[i][j] << “ “;cout<< C[i][j] << “ “; }} }} }} elseelse cout<<“n the matrices are notcout<<“n the matrices are not compatible for multiplication “;compatible for multiplication “; getch();getch(); }}
  • 5.
  • 8. Stats of text #include<iostream.h> #include<conio.h> #include<process.h> void textstat( char str[], int &lc, int &wc, int &cc); void main() { clrscr(); char str[255] = “ Hi how are you !! ”; int lc, wc, cc; cout<<“n Enter any string (~ to terminate) : “; cin.getline(str, 255,’~’) textstat(str, lc, wc, cc); cout<< “number of lines in the string are: “<< lc; cout<< “number of words in the string are: “<< wc; cout<< “number of characters in the string are: “<< cc; getch(); } int wordcount(char str[]) { int count = 1; for (int i = 0; str[i] ‘0’; ++i) { if (str[i] == ‘i’ || str[i] == ‘n’) {count ++; while (str[i] ==‘ ‘) i++; } if (str[i]==‘0’) i--; } return count; } int charcount(char str[]) int count = 0; for (int i = 0; str[i] ‘0’; ++i) count++; return count; } int linecount(char str[]) { int count = 1; for (int i = 0; str[i] ‘0’; ++i) if(str[i]==‘n’) count++; return count; } void textstat( char str[], int &lc, int &wc, int &cc) { lc = linecount(str); wc = wordcount(str); cc = charcount(str); }
  • 9. Nested structures#include<iostream.h> #include<conio.h> #include<stdio.h> struct addr { int houseno; char area[25]; char city[25]; char state[25]; }; struct emp { int empno; char name[25]; char desig[25]; addr address; float basic; } worker; int main () { clrscr(); cout<<" n Enter employee number:" cin>>worker.empno; cout<<" n Enter name:" gets(worker.name); cout<<" n Enter Designation:" gets(worker.desig); cout<<" n Enter House no. :" gets(worker.address.houseno); cout<<" n Enter Area" gets(worker.address.area); cout<<" n Enter city getsworker.address.city); cout<<" n Enter state" gets(worker.address.state); cout<<" n Enter Basic pay " cin>>worker.basic; return0; }
  • 10. Student’s Result#include<iostream.h> #include<conio.h> #include<stdio.h> struct student { int rollno; char name[25]; float marks; char grade; }; student learner; void main () { clrscr(); cout<<" n Enter roll number:" cin>>learner.rollno; cout<<" n Enter name:" gets(learner.name); cout<<" n marks in 5 subjects:" for (int i = 0;i < 5 ; ++i) { cout<<"Subject"<< i + 1 <<": "; cin>>learner.marks[i]; } float avg, total = 0; for (int i = 0;i < 5 ; ++i) total += sum[i]; avg = total/ 5; if (avg < 50) learner.grade = 'F'; else if (avg < 60) learner.grade = 'C'; else if (avg < 80) learner.grade = 'B'; else lerner.grade = 'A' cout<<" n Student's Result :" cout<<" n roll number :"<<learner.rollno; cout<<" n Name :' puts(learner.name); cout<<" n Total marks :"<< total; cout<<" n Grade :"<<learner.grade <<endl; } cout<<" n Enter Basic pay " cin>>worker.basic; return 0; }
  • 12. The later Date #include<iostream.h>#include<iostream.h> #include<conio.h>#include<conio.h> #include<process.h>#include<process.h> #include<stdio.h>#include<stdio.h> date later( dateS1, dateS2);date later( dateS1, dateS2); void main()void main() { clrscr();{ clrscr(); struct date { int day;struct date { int day; int month;int month; int year;int year; }d1, d2;}d1, d2; cout<<"enterfirst date";cout<<"enterfirst date"; cout<<"enterday";cout<<"enterday"; gets(d1.day);gets(d1.day); cout<<"entermonth";cout<<"entermonth"; gets(d1.month);gets(d1.month); cout<<"enteryear";cout<<"enteryear"; gets(d1.year);gets(d1.year); cout<<"n";cout<<"n"; cout<<"entersecond date";cout<<"entersecond date"; cout<<"enterday";cout<<"enterday"; gets(d2.day);gets(d2.day); cout<<"entermonth";cout<<"entermonth"; gets(d2.month);gets(d2.month); cout<<"enteryear";cout<<"enteryear"; gets(d2.year);gets(d2.year); date later(date S1, date S2)date later(date S1, date S2) getch();getch(); }} date later(date S1, date S2)date later(date S1, date S2) {{ if (S2.year> S1.year)if (S2.year> S1.year) cout<< S2;cout<< S2; else if (S1.year> S2.year)else if (S1.year> S2.year) cout<< S1;cout<< S1; else if (S1.month > S2.month)else if (S1.month > S2.month) cout<< S1;cout<< S1; else if (S1.month < S2.month)else if (S1.month < S2.month) cout<< S2;cout<< S2; else if (S2.day > S1.day)else if (S2.day > S1.day) cout<< S2;cout<< S2; elseelse cout<< S1;cout<< S1; }}