0% found this document useful (0 votes)
2 views

Coding

Mf md

Uploaded by

aditparashar26
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

Coding

Mf md

Uploaded by

aditparashar26
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

1cLudeciostream>

1HcliudecstrinE,h
11SSpace std;
int main(){
int txtASCII_Sum
string txt;
cout (< "Please Enter any String you want
getline(cin, txt); I
9 for (int i = 8; i ( txt.size(); i+){
12 cout ( "\nThe ASCII Value of "<< txt [i] <<" = " << (int)txt [i];
11 txtAsCII Sum = txtASCII_Sum + txt [i];
12
cout << "\nnThe Sum of ASCII Value in "<< txt << String = " << txtASCII Sum;
13
input
Please Enter any String you want tanjiro kamodo

The ASCII Value of t = 116


The ASCII Value of a = 97
The ASCII Value of n= 110
The A3CII Value of i = 106
The ASCII Value of i= 105
The ASCII Value of E= 114
The A3CII Value of o= 111
The ASCII Value of = 32
The A3CII Value o k= 107
The ABCII Value gf a = 97
The ABCII Value of = 109
The ACII Valåe of = 111
The ACII VaLue of 4 100
The kzCII VaLue of o 111
String 1426
The Sua of A5CII Value 1n tangiro kamodo
Proram finished with exit oode 0
SeArch
2 uS1" namespace std; enter the first character:a
3 int main(){ enter the second character:a
aand a, first and second are equal
5 char first,second;
cout<<" enter the first character:";
7 cin>>first;
cout<<"enter the second character: ";
cin>>second;
10
11
12- if (first == second) {
13 cOut<<first<<" and "<<second<<" first and second character are
equal \n";
14 }
15 else{
16 -cout<<first<e" and "<seconds<",farst and second character are not
equal tn";
17
18
19 return 0;
20

O Seardi
} 15
retürn
O; 14
vowels-><yoels; <<"number
of COut 13
} 12
11
Vowels+*; 10
U') =='0'||str
'==[i]
=='A'||str[1]-=EI|str(i]=-II|Str[1] =='u'||str
[1]
||str[i]=='1'||str[1)=='o'
|str[1] | =='e' (1] str ||=='a' [1if(str
] 9
i++){ str[i]; 0;i=for(int 8
0;
vowels= int
cin>>Str; 6
str[100] ; char 5
I main(){ int 4
vowels-
->4 number
of std, space name Using 3
eagerer <stdio.h> #include 2
78IwcXM.o /Xoi /tmp <iostream> #include 1
Output Run main.c
Coplar DOririe
rogramiz

You might also like