+ 1
Why it is showing no output please help me😢
4 odpowiedzi
+ 3
//Created by MUHAMMED.Hassan
/*
just input any sentence it will show you the frequency of words ☺️
still in progress showing no output you solve error inbox me
*/
import java.io.*;
import java.util.Scanner;
class Hassan
{
public static void main(String[] args) {
String s;
int i,j,l,f;
Scanner scan = new Scanner(System.in);
System.out.println("Enter a string in upper case");
s=scan.nextLine();
l=s.length();
for(i=65;i<=90;i++)
{
f=0;
for(j=0;j<l;j++)
{
if(s.charAt(j)==i)
{
f++;
}
}
if(f>0)
{
System.out.println((char)i+"\t"+f);
}
}
}
}
Try this I make some changes.
+ 3
what is i?
+ 2
You are welcome
+ 1
Oh!its work thanks😃