write a program using string functions for class X
Attachments:
Answers
Answered by
1
i am only writting the loop
int c=0;String s= "computer hardware"
for(char x='a';x<='z';x++)
{
for(int v=0;v<s.length();v++){
char ch =s.charAt(x);
if (ch==x)
c++;}
s.o.pln(x+'' "+c);
}}
int c=0;String s= "computer hardware"
for(char x='a';x<='z';x++)
{
for(int v=0;v<s.length();v++){
char ch =s.charAt(x);
if (ch==x)
c++;}
s.o.pln(x+'' "+c);
}}
Similar questions