Programlama | Programlama Dilleri | C Programlama Dili |C++

Anasayfa Programlama Java Harf Say?s? Yakalama


Harf Say?s? Yakalama

Java ile yaz?lm?? olan program d??ar?dan al?nan kurall? veya kurals?z bir cmlenin ierisinde bulunan harflerin say?s?n? toplayarak mesaj olarak gstermektedir. String i?lemleri, dizi i?lemleri, char i?lemlerine rnek te?kil eder.

 

  1. import javax.swing.*;
  2. import java.awt.*;
  3. import java.applet.*;
  4. import java.awt.event.*;
  5. /** * * @author NEO */
  6. public class Main {
  7. public static void main(String[] args)
  8. {
  9. String[] alfabe = {"a" , "b" , "c","" , "d" , "e" , "f" , "g","?" , "h" ,"?", "i" , "j" , "k" , "l" , "m" , "n" ,"o" ,"", "p" , "q" , "r" , "s" ,"?", "t" , "u" ,"", "v" , "w" , "x" , "y" , "z" };
  10. char[] add={'b','a','f','d'};
  11. String text = JOptionPane.showInputDialog("Cmle Giriniz");
  12.  
  13. int harf = 0;
  14.  
  15. for (int i=0; i<=text.length()-1; i++)
  16.  
  17.  
  18.  
  19. {
  20. for (int j=0; j<=31; j++)
  21. {
  22.  
  23. String den=text.substring(i,i+1);
  24. if ( den.equals(alfabe[j]))
  25. {
  26. harf++;
  27. }
  28. }
  29. }
  30. JOptionPane.showMessageDialog(null,harf,"harf toplam? sonular?",3);
  31. }
  32. }

Yorumlar (0)
Sadece kayıtlı kullanıcılar yorum yazabilir!
Son Güncelleme ( Cuma, 11 Ocak 2013 00:12 )  
backlinktr.biz | 523: Origin is unreachable

Error 523 Ray ID: 5355345dabb4d417 • 2019-11-14 01:27:45 UTC

Origin is unreachable

You

Browser

Working
Budapest

Cloudflare

Working
backlinktr.biz

Host

Error

What happened?

The origin web server is not reachable.

What can I do?

If you're a visitor of this website:

Please try again in a few minutes.

If you're the owner of this website:

Check your DNS Settings. A 523 error means that Cloudflare could not reach your host web server. The most common cause is that your DNS settings are incorrect. Please contact your hosting provider to confirm your origin IP and then make sure the correct IP is listed for your A record in your Cloudflare DNS Settings page. Additional troubleshooting information here.