I don't know where to start or how to write the program I need some help I am trying to program an uppercase character is an character whose ASCII value is between 65(A) and 90(Z). I need to write a program that prompts the user to enter a string from the keyboard and will count the number uppercase character and replace each uppercase character by the corresponding lowercase character.
I don't know where to start or how to write the program I need some help I am trying to program an uppercase character is an character whose ASCII value is between 65(A) and 90(Z). I need to write a program that prompts the user to enter a string from the keyboard and will count the number uppercase character and replace each uppercase character by the corresponding lowercase character.
PHP Code:
#include <stdio.h>
int main(void)
{
char string[50];
gets(string);
int count = 0;
int i;
for(i = 0; string[i]; i++)
{
if(string[i] >= 'A' && string[i] <= 'Z')
{
count++;
}
}
printf("%d", count);
}
Last edited by Demosthenes; 2004-10-16 at 01:05 PM.