SlideShare a Scribd company logo
1 of 15
1. Write a program to accept three integers and print the largest of them?
#include<iostream.h>
#include<conio.h>
void main()
{
clrscr();
int a,b,c;
cout<<“Enter three numbers ”;
cin>>a>>b>>c;
if(a>b && a>c)
cout<<a;
else if(b>a && b>c)
cout<<b;
else if(c>a && c>b)
cout<<c;
getch();
}
2. Write a program to input a character and check whether a given character is in alphabet or a
digit or any other special character.
#include<iostream.h>
#include<conio.h>
void main()
{
clrscr();
char a;
cout<<“Enter a character ”;
cin>>a;
if(a>= && a<=)
cout<<“You have entered a lowercase alphabet”;
else if(a>= && a<= )
cout<<“You have entered an uppercase alphabet”;
else if(a>= && a<=)
cout<<“You have entered a digit”;
else
cout<<“You have entered a special character”;
getch();
}
3. Write a program to print first ten natural numbers and their sum.
#include<iostream.h>
#include<conio.h>
void main()
{
clrscr();
int a,b=0;
for(a=1;a<=10;a++)
{
cout<<a<<endl;
b+=a;
}
cout<<“Summation ”<<b;
getch();
}
4. Write a program to print the following series.
0 1 1 2 3 5 8 13
#include<iostream.h>
#include<conio.h>
void main()
{
clrscr();
unsigned long first, second, third, n;
first=0;
second=1;
cout<<“How many elements you want to enter ”<<endl;
cin>>n;
cout<<first<<endl;
for(int i=2; i<n; i++)
{
third=first+second;
cout<<third;
first=second;
second=third;
}
getch();
}
5. Write a program to check whether a given number is palindrome or not.
#include<iostream.h>
#include<conio.h>
void main()
{
int n, num, digit, rev=0;
cout<<“Enter any number ”;
cin>>num;
n=num;
do
{
digit=num%10;
rev=(rev*10)+digit;
num=num/10;
}
while(num!=10)
cout<<“The reverse of the number is ”<<rev;
if(n==rev)
cout<<“The number is a Palindrome”;
else
cout<<“The number is not a Palindrome”;
getch();
}
6. Write a program to accept the marks of ten students and store them in an array. Also display the
total marks.
#include<iostream.h>
#include<conio.h>
void main()
{
int n, a[10], t=0;
for(n=1;n<=10;n++)
{
cout<<“Enter the marks of student ”<<n<<endl;
cin>>a[n];
t=t+a[n];
}
cout<<“The total of the marks is ”<<t;
getch();
}
7. Write a program to search for a specific element in a 1-D array through linear search.
#include<iostream.h>
#include<conio.h>
void main()
{
clrscr();
int a[5], size, i, flag=0, num, pos;
cout<<“Enter the number of elements in an array ”;
cin>>size;
cout<<“Enter the elements of the array ”;
for(i=0;i<size;i++)
{
cin>>a[i];
}
cout<<“Enter the element to be searched ”;
cin>>num;
for(i=0;i<size;i++)
if(a[i]==num)
{
flag=1;
pos=i;
break;
}
if(flag==0)
{
cout<<“Element not found!”;
}
else
{
cout<<“Element found at position ”<<pos+1;
}
getch();
}
8. Write a program to find the number of vowels in a given line of text using an array.
#include<iostream.h>
#include<conio.h>
#include<stdio.h>
void main()
{
clrscr();
char line[100];
int vow=0;
cout<<“Enter a sentence ”<<endl;
gets(line) ;
for(int i=0 ; line[i] !=‘0’;i++)
{
switch(line[i])
{
case ‘a’;
case ‘A’;
case ‘e’;
case ‘E’;
case ‘I’;
case ‘I’;
case ‘o’;
case ‘O’;
case ‘u’;
case ‘U’;
vow++;
}
}
cout<<“Total number of vowels in the given line is ”<<vow;
getch();
}
9. An array emp[20] contains the number of employees joined in different years. Write a
program to find out the number of year in which no employee joined.
#include<iostream.h>
#include<conio.h>
void main()
{
clrscr();
int emp[20], number_of_year=0;
cout<<“Enter the number of employees who joined in ”;
for(i=0;i<20;i++)
{
cout<<“Year is ”<<i+1<<endl;
cin>>emp[20];
if(emp[i]==0)
number_of_year=number_of_year+1;
}
cout<<“In ”<<number_of_year<<“ year number of employees joined”;
getch();
}
10. Write a program to calculate the length of string without using a library function.
#include<iostream.h>
#include<conio.h>
void main()
{
clrscr();
char str[20];
int a;
for(a=1; a<=20;a++)
{
cin>>str[a];
}
cout<<“Length of string is ”<<a;
getch();
}
11. Write a program that checks whether the given character is alphanumeric or a digit by using
standard library function.
#include<iostream.h>
#include<conio.h>
#include<string.h>
#include<stdlib.h>
void main()
{
char ch;
int a;
cout<<“Enter a character ”;
cin>>ch;
a=ch;
if(isalnum(a))
{
cout<<“Alphanumeric Character”;
}
else if(isalpha(a))
{
cout<<“Alphabetic Character”;
}
else if(isdigit(a))
{
cout<<“Numeric Character”;
}
else
cout<<“Other Character”;
getch();
}
12. Write a program to swap two values and make a new program.
#include<iostream.h>
#include<conio.h>
void main()
{
clrscr();
void swap(int &, int &)
int a, b;
cout<<“Enter the first number ”;
cin>>a;
cout<<“Enter the second number ”;
cin>>b;
swap(a, b);
cout<<“After swapping the values are ”<<a<<b;
getch();
}
void swap(int &x, int &y)
{
int z;
z=x;
x=y;
y=z;
cout<<“The swapped values are ”<<x<<y;
}
13. Write a program to generate the following output:
#include<iostream.h>
#include<conio.h>
void main()
{
int a, b;
for(a=1;a<=5;a++)
{
for(b=1;b<=a;b++)
{
cout<<“* ”;
}
cout<<endl;
}
getch();
}
*
* *
* * *
* * * *
* * * * *
14. Write a function that finds a sub-string from a given string and returns the string to its caller
function.
#include<iostream.h>
#include<conio.h>
void main()
{
15. Write a program that generates the following output:
#include<iostream.h>
#include<conio.h>
void main()
{
int a, b, c, d;
for(a=1;a<=4;a++)
{
for(b=1;b<=a;b++)
{
cout<<“* ”;
}
cout<<endl;
}
for(c=1;c<=3;c++)
{
for(d=3;d>=c;d‒‒)
{
cout<<“* ”;
}
cout<<endl;
}
getch();
}
*
* *
* * *
* * * *
* * *
* *
*

More Related Content

What's hot

Oops practical file
Oops practical fileOops practical file
Oops practical fileAnkit Dixit
 
Common problems solving using c
Common problems solving using cCommon problems solving using c
Common problems solving using cArghodeepPaul
 
Let us c(by Yashwant Kanetkar) 5th edition solution chapter 1
Let us c(by Yashwant Kanetkar) 5th edition solution chapter 1Let us c(by Yashwant Kanetkar) 5th edition solution chapter 1
Let us c(by Yashwant Kanetkar) 5th edition solution chapter 1rohit kumar
 
Bcsl 033 data and file structures lab s5-3
Bcsl 033 data and file structures lab s5-3Bcsl 033 data and file structures lab s5-3
Bcsl 033 data and file structures lab s5-3Dr. Loganathan R
 
Best C Programming Solution
Best C Programming SolutionBest C Programming Solution
Best C Programming Solutionyogini sharma
 
c++ program for Railway reservation
c++ program for Railway reservationc++ program for Railway reservation
c++ program for Railway reservationSwarup Kumar Boro
 
1 borland c++ 5.02 by aramse
1   borland c++ 5.02 by aramse1   borland c++ 5.02 by aramse
1 borland c++ 5.02 by aramseAram SE
 
COMPUTER SCIENCE CLASS 12 PRACTICAL FILE
COMPUTER SCIENCE CLASS 12 PRACTICAL FILECOMPUTER SCIENCE CLASS 12 PRACTICAL FILE
COMPUTER SCIENCE CLASS 12 PRACTICAL FILEAnushka Rai
 
Itp practical file_1-year
Itp practical file_1-yearItp practical file_1-year
Itp practical file_1-yearAMIT SINGH
 
Computer Practical
Computer PracticalComputer Practical
Computer PracticalPLKFM
 
Lab 1: Compiler Toolchain
Lab 1: Compiler ToolchainLab 1: Compiler Toolchain
Lab 1: Compiler Toolchainenidcruz
 
C- Programs - Harsh
C- Programs - HarshC- Programs - Harsh
C- Programs - HarshHarsh Sharma
 

What's hot (20)

SaraPIC
SaraPICSaraPIC
SaraPIC
 
Oops practical file
Oops practical fileOops practical file
Oops practical file
 
Common problems solving using c
Common problems solving using cCommon problems solving using c
Common problems solving using c
 
C Programming Example
C Programming Example C Programming Example
C Programming Example
 
Let us c(by Yashwant Kanetkar) 5th edition solution chapter 1
Let us c(by Yashwant Kanetkar) 5th edition solution chapter 1Let us c(by Yashwant Kanetkar) 5th edition solution chapter 1
Let us c(by Yashwant Kanetkar) 5th edition solution chapter 1
 
C Programming Example
C Programming ExampleC Programming Example
C Programming Example
 
C++ 4
C++ 4C++ 4
C++ 4
 
week-6x
week-6xweek-6x
week-6x
 
Bcsl 033 data and file structures lab s5-3
Bcsl 033 data and file structures lab s5-3Bcsl 033 data and file structures lab s5-3
Bcsl 033 data and file structures lab s5-3
 
Best C Programming Solution
Best C Programming SolutionBest C Programming Solution
Best C Programming Solution
 
c++ program for Railway reservation
c++ program for Railway reservationc++ program for Railway reservation
c++ program for Railway reservation
 
1 borland c++ 5.02 by aramse
1   borland c++ 5.02 by aramse1   borland c++ 5.02 by aramse
1 borland c++ 5.02 by aramse
 
COMPUTER SCIENCE CLASS 12 PRACTICAL FILE
COMPUTER SCIENCE CLASS 12 PRACTICAL FILECOMPUTER SCIENCE CLASS 12 PRACTICAL FILE
COMPUTER SCIENCE CLASS 12 PRACTICAL FILE
 
Itp practical file_1-year
Itp practical file_1-yearItp practical file_1-year
Itp practical file_1-year
 
Railwaynew
RailwaynewRailwaynew
Railwaynew
 
Computer Practical
Computer PracticalComputer Practical
Computer Practical
 
Lab 1: Compiler Toolchain
Lab 1: Compiler ToolchainLab 1: Compiler Toolchain
Lab 1: Compiler Toolchain
 
C++ file
C++ fileC++ file
C++ file
 
Cmptr ass
Cmptr assCmptr ass
Cmptr ass
 
C- Programs - Harsh
C- Programs - HarshC- Programs - Harsh
C- Programs - Harsh
 

Viewers also liked

Viewers also liked (15)

Ummaya (1)
Ummaya (1)Ummaya (1)
Ummaya (1)
 
солосина неделя игрушки
солосина неделя игрушкисолосина неделя игрушки
солосина неделя игрушки
 
A falta de arte nas artes de um CEO
A falta de arte nas artes de um CEOA falta de arte nas artes de um CEO
A falta de arte nas artes de um CEO
 
Presentación1
Presentación1Presentación1
Presentación1
 
In three years time
In three years timeIn three years time
In three years time
 
Thousand year game v5
Thousand year game v5Thousand year game v5
Thousand year game v5
 
My dream
My dreamMy dream
My dream
 
Mahavir Jayanti
Mahavir JayantiMahavir Jayanti
Mahavir Jayanti
 
Tvm termoventilmec 2010-newsletter-09-imp asp acciaio
Tvm termoventilmec 2010-newsletter-09-imp asp acciaioTvm termoventilmec 2010-newsletter-09-imp asp acciaio
Tvm termoventilmec 2010-newsletter-09-imp asp acciaio
 
Jbs
JbsJbs
Jbs
 
Killer Cover Letters
Killer Cover LettersKiller Cover Letters
Killer Cover Letters
 
CornFinger Investor Pitch Deck (Fall 2010)
CornFinger Investor Pitch Deck (Fall 2010)CornFinger Investor Pitch Deck (Fall 2010)
CornFinger Investor Pitch Deck (Fall 2010)
 
El CRAI Biblioteca de Dret en 5 minuts
El CRAI Biblioteca de Dret en 5 minutsEl CRAI Biblioteca de Dret en 5 minuts
El CRAI Biblioteca de Dret en 5 minuts
 
COLLEGE: How to Pick a School
COLLEGE: How to Pick a SchoolCOLLEGE: How to Pick a School
COLLEGE: How to Pick a School
 
Business Development: Referral Engines
Business Development: Referral EnginesBusiness Development: Referral Engines
Business Development: Referral Engines
 

Similar to Cs project

Bcsl 033 data and file structures lab s2-3
Bcsl 033 data and file structures lab s2-3Bcsl 033 data and file structures lab s2-3
Bcsl 033 data and file structures lab s2-3Dr. Loganathan R
 
Assignment c programming
Assignment c programmingAssignment c programming
Assignment c programmingIcaii Infotech
 
2 BytesC++ course_2014_c8_ strings
2 BytesC++ course_2014_c8_ strings 2 BytesC++ course_2014_c8_ strings
2 BytesC++ course_2014_c8_ strings kinan keshkeh
 
PCA-2 Programming and Solving 2nd Sem.pdf
PCA-2 Programming and Solving 2nd Sem.pdfPCA-2 Programming and Solving 2nd Sem.pdf
PCA-2 Programming and Solving 2nd Sem.pdfAshutoshprasad27
 
PCA-2 Programming and Solving 2nd Sem.docx
PCA-2 Programming and Solving 2nd Sem.docxPCA-2 Programming and Solving 2nd Sem.docx
PCA-2 Programming and Solving 2nd Sem.docxAshutoshprasad27
 
the refernce of programming C notes ppt.pptx
the refernce of programming C notes ppt.pptxthe refernce of programming C notes ppt.pptx
the refernce of programming C notes ppt.pptxAnkitaVerma776806
 
C++ and OOPS Crash Course by ACM DBIT | Grejo Joby
C++ and OOPS Crash Course by ACM DBIT | Grejo JobyC++ and OOPS Crash Course by ACM DBIT | Grejo Joby
C++ and OOPS Crash Course by ACM DBIT | Grejo JobyGrejoJoby1
 
Introduction to Basic C programming 02
Introduction to Basic C programming 02Introduction to Basic C programming 02
Introduction to Basic C programming 02Wingston
 
Programming fundamentals
Programming fundamentalsProgramming fundamentals
Programming fundamentalsZaibi Gondal
 
12th CBSE Practical File
12th CBSE Practical File12th CBSE Practical File
12th CBSE Practical FileAshwin Francis
 
Cs pritical file
Cs pritical fileCs pritical file
Cs pritical fileMitul Patel
 
Library functions in c++
Library functions in c++Library functions in c++
Library functions in c++Neeru Mittal
 
Core programming in c
Core programming in cCore programming in c
Core programming in cRahul Pandit
 

Similar to Cs project (20)

Statement
StatementStatement
Statement
 
String
StringString
String
 
C++ file
C++ fileC++ file
C++ file
 
C programming
C programmingC programming
C programming
 
Bcsl 033 data and file structures lab s2-3
Bcsl 033 data and file structures lab s2-3Bcsl 033 data and file structures lab s2-3
Bcsl 033 data and file structures lab s2-3
 
Assignment c programming
Assignment c programmingAssignment c programming
Assignment c programming
 
2 BytesC++ course_2014_c8_ strings
2 BytesC++ course_2014_c8_ strings 2 BytesC++ course_2014_c8_ strings
2 BytesC++ course_2014_c8_ strings
 
C file
C fileC file
C file
 
PCA-2 Programming and Solving 2nd Sem.pdf
PCA-2 Programming and Solving 2nd Sem.pdfPCA-2 Programming and Solving 2nd Sem.pdf
PCA-2 Programming and Solving 2nd Sem.pdf
 
PCA-2 Programming and Solving 2nd Sem.docx
PCA-2 Programming and Solving 2nd Sem.docxPCA-2 Programming and Solving 2nd Sem.docx
PCA-2 Programming and Solving 2nd Sem.docx
 
the refernce of programming C notes ppt.pptx
the refernce of programming C notes ppt.pptxthe refernce of programming C notes ppt.pptx
the refernce of programming C notes ppt.pptx
 
C++ and OOPS Crash Course by ACM DBIT | Grejo Joby
C++ and OOPS Crash Course by ACM DBIT | Grejo JobyC++ and OOPS Crash Course by ACM DBIT | Grejo Joby
C++ and OOPS Crash Course by ACM DBIT | Grejo Joby
 
C++ file
C++ fileC++ file
C++ file
 
Introduction to Basic C programming 02
Introduction to Basic C programming 02Introduction to Basic C programming 02
Introduction to Basic C programming 02
 
Programming fundamentals
Programming fundamentalsProgramming fundamentals
Programming fundamentals
 
12th CBSE Practical File
12th CBSE Practical File12th CBSE Practical File
12th CBSE Practical File
 
Cs pritical file
Cs pritical fileCs pritical file
Cs pritical file
 
Library functions in c++
Library functions in c++Library functions in c++
Library functions in c++
 
Core programming in c
Core programming in cCore programming in c
Core programming in c
 
Cpp c++ 1
Cpp c++ 1Cpp c++ 1
Cpp c++ 1
 

Recently uploaded

Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...apidays
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWERMadyBayot
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native ApplicationsWSO2
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...apidays
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MIND CTI
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingEdi Saputra
 

Recently uploaded (20)

Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 

Cs project

  • 1. 1. Write a program to accept three integers and print the largest of them? #include<iostream.h> #include<conio.h> void main() { clrscr(); int a,b,c; cout<<“Enter three numbers ”; cin>>a>>b>>c; if(a>b && a>c) cout<<a; else if(b>a && b>c) cout<<b; else if(c>a && c>b) cout<<c; getch(); }
  • 2. 2. Write a program to input a character and check whether a given character is in alphabet or a digit or any other special character. #include<iostream.h> #include<conio.h> void main() { clrscr(); char a; cout<<“Enter a character ”; cin>>a; if(a>= && a<=) cout<<“You have entered a lowercase alphabet”; else if(a>= && a<= ) cout<<“You have entered an uppercase alphabet”; else if(a>= && a<=) cout<<“You have entered a digit”; else cout<<“You have entered a special character”; getch(); }
  • 3. 3. Write a program to print first ten natural numbers and their sum. #include<iostream.h> #include<conio.h> void main() { clrscr(); int a,b=0; for(a=1;a<=10;a++) { cout<<a<<endl; b+=a; } cout<<“Summation ”<<b; getch(); }
  • 4. 4. Write a program to print the following series. 0 1 1 2 3 5 8 13 #include<iostream.h> #include<conio.h> void main() { clrscr(); unsigned long first, second, third, n; first=0; second=1; cout<<“How many elements you want to enter ”<<endl; cin>>n; cout<<first<<endl; for(int i=2; i<n; i++) { third=first+second; cout<<third; first=second; second=third; } getch(); }
  • 5. 5. Write a program to check whether a given number is palindrome or not. #include<iostream.h> #include<conio.h> void main() { int n, num, digit, rev=0; cout<<“Enter any number ”; cin>>num; n=num; do { digit=num%10; rev=(rev*10)+digit; num=num/10; } while(num!=10) cout<<“The reverse of the number is ”<<rev; if(n==rev) cout<<“The number is a Palindrome”; else cout<<“The number is not a Palindrome”; getch(); }
  • 6. 6. Write a program to accept the marks of ten students and store them in an array. Also display the total marks. #include<iostream.h> #include<conio.h> void main() { int n, a[10], t=0; for(n=1;n<=10;n++) { cout<<“Enter the marks of student ”<<n<<endl; cin>>a[n]; t=t+a[n]; } cout<<“The total of the marks is ”<<t; getch(); }
  • 7. 7. Write a program to search for a specific element in a 1-D array through linear search. #include<iostream.h> #include<conio.h> void main() { clrscr(); int a[5], size, i, flag=0, num, pos; cout<<“Enter the number of elements in an array ”; cin>>size; cout<<“Enter the elements of the array ”; for(i=0;i<size;i++) { cin>>a[i]; } cout<<“Enter the element to be searched ”; cin>>num; for(i=0;i<size;i++) if(a[i]==num) { flag=1; pos=i; break; } if(flag==0) { cout<<“Element not found!”; } else { cout<<“Element found at position ”<<pos+1; } getch(); }
  • 8. 8. Write a program to find the number of vowels in a given line of text using an array. #include<iostream.h> #include<conio.h> #include<stdio.h> void main() { clrscr(); char line[100]; int vow=0; cout<<“Enter a sentence ”<<endl; gets(line) ; for(int i=0 ; line[i] !=‘0’;i++) { switch(line[i]) { case ‘a’; case ‘A’; case ‘e’; case ‘E’; case ‘I’; case ‘I’; case ‘o’; case ‘O’; case ‘u’; case ‘U’; vow++; } } cout<<“Total number of vowels in the given line is ”<<vow; getch(); }
  • 9. 9. An array emp[20] contains the number of employees joined in different years. Write a program to find out the number of year in which no employee joined. #include<iostream.h> #include<conio.h> void main() { clrscr(); int emp[20], number_of_year=0; cout<<“Enter the number of employees who joined in ”; for(i=0;i<20;i++) { cout<<“Year is ”<<i+1<<endl; cin>>emp[20]; if(emp[i]==0) number_of_year=number_of_year+1; } cout<<“In ”<<number_of_year<<“ year number of employees joined”; getch(); }
  • 10. 10. Write a program to calculate the length of string without using a library function. #include<iostream.h> #include<conio.h> void main() { clrscr(); char str[20]; int a; for(a=1; a<=20;a++) { cin>>str[a]; } cout<<“Length of string is ”<<a; getch(); }
  • 11. 11. Write a program that checks whether the given character is alphanumeric or a digit by using standard library function. #include<iostream.h> #include<conio.h> #include<string.h> #include<stdlib.h> void main() { char ch; int a; cout<<“Enter a character ”; cin>>ch; a=ch; if(isalnum(a)) { cout<<“Alphanumeric Character”; } else if(isalpha(a)) { cout<<“Alphabetic Character”; } else if(isdigit(a)) { cout<<“Numeric Character”; } else cout<<“Other Character”; getch(); }
  • 12. 12. Write a program to swap two values and make a new program. #include<iostream.h> #include<conio.h> void main() { clrscr(); void swap(int &, int &) int a, b; cout<<“Enter the first number ”; cin>>a; cout<<“Enter the second number ”; cin>>b; swap(a, b); cout<<“After swapping the values are ”<<a<<b; getch(); } void swap(int &x, int &y) { int z; z=x; x=y; y=z; cout<<“The swapped values are ”<<x<<y; }
  • 13. 13. Write a program to generate the following output: #include<iostream.h> #include<conio.h> void main() { int a, b; for(a=1;a<=5;a++) { for(b=1;b<=a;b++) { cout<<“* ”; } cout<<endl; } getch(); } * * * * * * * * * * * * * * *
  • 14. 14. Write a function that finds a sub-string from a given string and returns the string to its caller function. #include<iostream.h> #include<conio.h> void main() {
  • 15. 15. Write a program that generates the following output: #include<iostream.h> #include<conio.h> void main() { int a, b, c, d; for(a=1;a<=4;a++) { for(b=1;b<=a;b++) { cout<<“* ”; } cout<<endl; } for(c=1;c<=3;c++) { for(d=3;d>=c;d‒‒) { cout<<“* ”; } cout<<endl; } getch(); } * * * * * * * * * * * * * * * *