INFO KNOWLEDGE


Posting kali ini saya akan share bagaimana cara menghitung jumlah karakter dalam sebuah kalimat… kali ini saya tidak menggunakan library string yakni strlen (untuk menghitung jumlah karakter). tapi saya disini memanfaatkan penggunaan fungsi percabangan if, fungsi getchar, dan looping while…
langsung aja berikut Scriptnya:

#include<stdio.h>
#include<conio.h>
main()
{
char kar,kalimat;
int jumkar=1, jumspasi=0;
printf(“\tMasukkan sebuah kalimat : “);
scanf(“%c”,&kalimat);
while((kar = getchar()) != ‘\n’){
// jumlah karakter yang diinput tambah 1 hingga menemukan karakter enter
jumkar++;
// jika terdapat karakter spasi,maka variabel akan dihitung  1
if (kar == ‘ ‘) jumspasi++;
}

printf(“\n\tJumlah karakter\t= %d”, jumkar);
printf(“\n\tJumlah spasi\t= %d\n”, jumspasi);
}

Semoga Membantu trimakasih.. Good Luck!!!

55 responses to “Program Menghitung jumlah karakter dan spasi”

  1. jangan cuma mikir gan
    bebuat donk

    1. Bukan Mikir gan tapi pemikir [membuat solusi + Tindakan]
      mikir==hanya sekedar berfikir

  2. susah, bingung pusing.:(

    1. mantap gan, jangan menyerah, sedikit sharing aja, kalo yang ini simpel saja;
      C++ MENGHITUNG PANJANG STRING DENGAN strlen()

  3. gan, saya coba menampilkna hasil scanf ke lcd pake lcd_putsf tapi gagal
    ini codenya :

    lcd_clear();
    printf(“masukkan karakter :”);
    scanf(“%c”,&data);
    lcd_putsf(data);

    error gan :
    Error: E:\tes\serial.c(363): function argument #1 of type ‘unsigned char’ is incompatible with required parameter of type ‘flash unsigned char *’

    kenapa ya?
    thanks

  4. I am regular reader, how are you everybody? This article posted at this
    site is in fact pleasant.

  5. Majority with the hotels are situated on the
    heart of your city so there is certainly no communication trouble through the hotels.
    They do last longer than stainless steel bearings
    used in the past. There are 18 Golf Courses near the Marriott Resort and Swim Spa Hotel
    of Pattaya.

  6. The Luxembourg Gardens are the Parisian version of London’s Hyde Park and NYC’s Central Park.

    The shipping is made free all over India with additional discounts on holiday seasons.

    Recently, Chef Bellanger explained to me, “When we started Mad Mac in 2006, cupcakes were the thing, they were exploding,” he explains, “like macarons had done in France years before.

  7. Most men are not into gifts actually, but because you took effort in preparing unique presents for them, their prospective may likely to change.
    For this reason, most of the companies like the above mentioned are desperately waiting to revert to the request they receive for baby free gifts or baby
    gifts online. Now comes the second part; what you choose to
    give as a gift and what it signifies.

  8. This article discusses the best indoor tanning lotions
    on the market today. But manage on previously than you go off to get
    hold of a pair that in form you the best as a result of you earliest have to have to master about about what in truth can help make swimwear alluring and retains
    it from presently staying dull. Find the latest trends for
    summer, tips on wearing plus size leggings, tips on dresses for every occasion and three ways
    to wear one shirt.

  9. Also known as “the pearl of orient” is a dream destination not only for the people of the country but even people from across
    the globe. The standard laboratory testing techniques performed are for experimental studies usually assigned as projects.

    These kinds of Chinese young ladies advertised as masseurs aren’t only terrific in massage,
    but they are pleasing to watch initially.

  10. My spouse and I stumbled over here different website and thought I might check things out.
    I like what I see so i am just following you. Look forward to checking out your web page repeatedly.

  11. It’s actually very difficult in this full of activity
    life to listen news on Television, so I simply use web for that purpose, and take the latest news.

    1. Got sucked into your page for almost the last 30 minutes. When I started my Iphone this page was running. It’s almost like you read my mind! I truly discovered a lot here today. WordPress experts would agree with you. I only got about a paragraph through your article and I’ll take a look at the rest of the article when I go to work.

  12. As the admin of this website is working, no doubt very quickly it will be
    renowned, due to its feature contents.

  13. Hi there, You’ve done an excellent job. I’ll certainly digg
    it and personally suggest to my friends. I am confident they’ll be benefited from
    this website.

    1. I don’t fully understand what you are trying to say. When I opened my lap top this site was already running. I like this so much! Thanks for sharing these awesome blog with us. To err is part of being a human, but do not count on people for forgiveness.

  14. magnificent issues altogether, you simply won a new reader.
    What could you suggest in regards to your put up that
    you just made some days in the past? Any positive?

  15. A motivating discussion is worth comment. I do believe that you ought to write more about this subject matter,
    it might not be a taboo matter but typically folks don’t talk about these
    subjects. To the next! Many thanks!!

  16. Wonderful site. Plenty of helpful info here.
    I’m sending it to some pals ans also sharing in delicious.

    And of course, thank you to your sweat!

  17. When someone writes an paragraph he/she retains the
    idea of a user in his/her brain that how a user can know it.
    So that’s why this post is perfect. Thanks!

  18. Heya i’m for the primary time here. I found this board and
    I in finding It really helpful & it helped me
    out much. I am hoping to present something back and help others such as you
    aided me.

  19. I was recommended this blog by my cousin. I am no longer positive whether this submit is written through
    him as no one else recognize such unique about my problem.
    You are wonderful! Thanks!

  20. Hi there! Do you know if they make any plugins to assist with SEO?
    I’m trying to get my blog to rank for some targeted keywords but I’m not seeing very good results.

    If you know of any please share. Thank you!

  21. If some one needs to be updated with newest technologies after that he must be pay a visit this site and
    be up to date all the time.

  22. Hi, I think your blog might be having browser compatibility issues.
    When I look at your website in Opera, it looks fine but when opening in Internet Explorer, it
    has some overlapping. I just wanted to give you a quick heads up!
    Other then that, very good blog!

  23. Every weekend i used to pay a visit this site, because i wish
    for enjoyment, as this this web page conations actually good funny information too.

  24. Wonderful beat ! I would like to apprentice whilst you amend your website, how could i subscribe
    for a weblog site? The account helped me a applicable deal.
    I have been a little bit familiar of this your broadcast provided bright clear concept

  25. Hey there, You’ve done a great job. I’ll certainly digg it and personally
    suggest to my friends. I’m confident they will be benefited from this web site.

  26. Hey! I know this is kinda off topic nevertheless I’d figured
    I’d ask. Would you be interested in exchanging links or maybe guest authoring a blog post or vice-versa?
    My blog addresses a lot of the same topics as yours and I believe we could
    greatly benefit from each other. If you are interested
    feel free to shoot me an email. I look forward to hearing from you!
    Excellent blog by the way!

  27. Thanks for every other informative blog. The place else may I
    am getting that kind of information written in such an ideal manner?
    I have a undertaking that I am simply now running on, and I’ve been at the look out for such info.

  28. Hi! I understand this is somewhat off-topic but I needed to ask.
    Does running a well-established blog such as yours take a massive amount work?
    I’m completely new to running a blog however I do write in my journal every day.
    I’d like to start a blog so I will be able to share my own experience and thoughts online.
    Please let me know if you have any suggestions or
    tips for brand new aspiring blog owners. Appreciate it!

  29. Hello! I’ve been reading your site for a long
    time now and finally got the bravery to go ahead and give you
    a shout out from Porter Texas! Just wanted to say keep up the great work!

  30. I’m pretty pleased to uncover this great site. I want to to thank you for ones
    time for this fantastic read!! I definitely enjoyed every bit of
    it and I have you saved as a favorite to check out new things on your website.

  31. What’s up, its nice paragraph about media print,
    we all be familiar with media is a fantastic source of information.

  32. Remarkable! Its actually awesome piece of writing, I have got
    much clear idea on the topic of from this article.

  33. I have read so many posts concerning the blogger lovers but this post is
    really a fastidious post, keep it up.

  34. Pretty portion of content. I simply stumbled upon your website
    and in accession capital to assert that I get actually loved account
    your weblog posts. Any way I will be subscribing in your feeds
    and even I success you get entry to constantly quickly.

  35. Hello! I just wanted to ask if you ever have any problems with hackers?
    My last blog (wordpress) was hacked and I ended up losing many months of hard work due to no backup.
    Do you have any methods to prevent hackers?

  36. Hi, after reading this awesome paragraph i am also delighted to share my knowledge here with mates.

  37. Hmm is anyone else encountering problems with the images on this blog loading?
    I’m trying to find out if its a problem on my end or if it’s the blog.
    Any suggestions would be greatly appreciated.

  38. When someone writes an article he/she retains the idea of a
    user in his/her brain that how a user can understand
    it. Thus that’s why this piece of writing is perfect.
    Thanks!

  39. What i do not realize is in truth how you are not really much more neatly-preferred than you
    may be right now. You’re so intelligent. You know thus considerably
    relating to this topic, produced me individually consider it from a lot of numerous angles.

    Its like women and men don’t seem to be interested except it is something to accomplish with Girl
    gaga! Your own stuffs nice. Always care for it up!

  40. Very good info. Lucky me I recently found your website by chance (stumbleupon).
    I have bookmarked it for later!

  41. You need to be a part of a contest for one of the most useful sites online.
    I most certainly will recommend this website!

  42. Great post however I was wanting to know if you could write
    a litte more on this topic? I’d be very thankful if you could elaborate a little bit further.

    Appreciate it!

  43. Hi, constantly i used to check website posts here early in the morning, as
    i like to find out more and more.

  44. I love to walk, but when I first moved to Bangkok, Thailand, the incredible heat made
    me think I’d probably never go for a walk again. ‘ Condoms must be used when taking anti-biotics.
    The new drug, called Xiaflex, is the first non-surgical treatment for men with an erect curvature deformity of at least 30 degrees.

  45. Many guys are asking about surgery only to locate out
    the huge expenses involved, together with the very small chances of success.
    For the people that happen to be wanting to see long lasting
    and safe and sound results from their how to grow your penis journey then make sure you keep away from these 3 ‘so referred to as solutions’ in any way costs.
    Prostate massagers can also be found that will aid in prostate stimulation that can promote a healthy prostate and lead to stronger erections.

  46. I have been exploring for a little for any high quality articles or weblog podts in this sort of space .

    Exploring in Yaho I eventually stumbled upon this
    web site. Reading this information So i am glad to exhibit
    that I have a very just right uncanny feeling I found out just
    what I needed. I most for sure will make suee too doo not overlook this website
    and give it a look on a continuing basis.

  47. I truly enjoy reading on this internet site , it has fantastic content . “He who sees the truth, let him proclaim it, without asking who is for it or who is against it.” by Henry George.

  48. This website has interesting and solid content. Found this on Google Plus and I am glad I did I hate that my computer battery is about dead.

  49. Thanks for a marvelous posting! I actually enjoyed reading it, you are a great author.I will be sure to bookmark your blog and definitely will come back later on. I want to encourage you to continue your great writing, have a nice weekend!

  50. Thanks for the suggestions you have shared here. Additionally, I believe there are numerous factors which keep your car insurance policy premium all the way down. One is, to think about buying motors that are in the good report on car insurance businesses. Cars that are expensive tend to be more at risk of being lost. Aside from that insurance policies are also using the value of your automobile, so the higher priced it is, then the higher your premium you spend.

Leave a reply to http://www.marktplaats.nl Cancel reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.