Showing posts with label count capital and small letters in c. Show all posts
Showing posts with label count capital and small letters in c. Show all posts

Saturday, August 10, 2019

Count Capital and Small Letters in C

Here is a sample program that I wrote using C programming language to count the occurrence of capital and small letters in a given sentence in C.

I am currently accepting programming work, IT projects, school and application development, programming projects, thesis and capstone projects, IT consulting work, computer tutorials, and web development work kindly contact me in the following email address for further details.  If you want to advertise on my website kindly contact me also in my email address also. Thank you.

My email address is the following jakerpomperada@gmail.com, jakerpomperada@aol.com, and jakerpomperada@yahoo.com.

My mobile number here in the Philippines is 09173084360.

My telephone number at home here in Bacolod City, Negros Occidental Philippines is  +63 (034) 4335675.

Here in Bacolod I also accepting computer repair, networking and Arduino Project development at a very affordable price.

My personal website is http://www.jakerpomperada.com




Sample Program Output


Program Listing

count.c

#include <stdio.h>
#include <stdlib.h>

char count_captial_small(char *y)
{

 int upper_case_letters = 0, lower_case_letters = 0,counter=0;
   counter = 0;
   while (y[counter] != '\0') {
      if (y[counter] >= 'A' && y[counter] <= 'Z')
         upper_case_letters++;
      if (y[counter] >= 'a' && y[counter] <= 'z')
         lower_case_letters++;
    counter++;
   }
   printf("\n\n");
   printf("\t ===== DISPLAY RESULT =====");
   printf("\n\n");
   printf("\nNumber of Uppercase Letters ===> %d.", upper_case_letters);
   printf("\nNumber of Lowercase Letters ===> %d.", lower_case_letters);
   printf("\n\n");
   printf("\t Thank you for this program.");
   printf("\n\n");
}

int main() {
   char ch[255];
   printf("\tCount Capital and Small Letters in C");
   printf("\n\n");
   printf("\nKindly enter a Word or a Sentence :=> ");
   gets(ch);
   count_captial_small(ch);
   return (0);
}




Sunday, May 24, 2015

Count Capital and Small Letters in C

In this article I would like to share with you a simple string manipulation program that I wrote using C programming language I called this program count the number of capital and small letters in c. What the program will do is to ask the user to enter a word or sentence afterwards our program will count the number of occurrence of capital and small letters in a given word or sentence by our end user. The program is very simple it users while loop statement, pointers and one dimensional array to solve the problem.

If you ask me what type of C compiler that I am using in this program I am using Dev C++ that run in CodeBlocks text editor all this compiler can download free from charge over the Internet.

I hope you will find my work useful and beneficial in your learning how to program using C programming language. If you have some questions please send me an email at jakerpomperada@gmail.com and jakerpomperada@yahoo.com. You can reach me at my mobile number here in the Philippines at 09173084360.

Thank you very much and God Bless.


Sample Program Output

Program Listing


#include <stdio.h>
#include <stdlib.h>

char count_captial_small(char *y)
{

 int upper_case_letters = 0, lower_case_letters = 0,counter=0;
   counter = 0;
   while (y[counter] != '\0') {
      if (y[counter] >= 'A' && y[counter] <= 'Z')
         upper_case_letters++;
      if (y[counter] >= 'a' && y[counter] <= 'z')
         lower_case_letters++;
    counter++;
   }
   printf("\n\n");
   printf("\t ===== DISPLAY RESULT =====");
   printf("\n\n");
   printf("\nNumber of Uppercase Letters ===> %d.", upper_case_letters);
   printf("\nNumber of Lowercase Letters ===> %d.", lower_case_letters);
   printf("\n\n");
   printf("\t Thank you for this program.");
   printf("\n\n");
}

int main() {
   char ch[255];
   printf("\tCount Capital and Small Letters in C");
   printf("\n\n");
   printf("\nKindly enter a Word or a Sentence :=> ");
   gets(ch);
   count_captial_small(ch);
   return (0);
}