Search
 
SCRIPT & CODE EXAMPLE
 

C

vowel or consonant in c

// vowel or consonant check program
#include <stdio.h>
int main()
{
    char ch;
    ch = getchar();
    if (ch == 'a' || ch == 'e' || ch == 'i' || ch == 'o' || ch == 'u')
    {
        printf("%c is Vowel
", ch);
    }
    else
    {
        printf("%c is consonant
", ch);
    }
    return 0;
}
Comment

vowel and consonant C

//vowel or consonant check program in C using only the if
#include <stdio.h>
#include <stdlib.h>

int main()
{
    char letter;

    printf("Enter a letter: 
");
    scanf("%c", &letter);

    if (letter >= 65 && letter <= 90 || letter >= 97 && letter <= 122) //this line check if you have entered a letter based on the ascii chart
    {
        if (letter == 'a' || letter == 'A' || letter == 'e' || letter == 'E' || letter == 'i' || letter == 'I' || letter == 'o' || letter == 'O' || letter == 'u' || letter == 'U')
        {
            printf("The letter that you have entered (%c) is a vowel
", letter);
        }
        else
        {
            printf("The letter that you have entered (%c) is a consonant
", letter);
        }
    }
    else
    {
        printf("You didn't enter any letter
");
    }
    system("pause");
    return 0;
}
Comment

vowel and consonant identification in c

if(ch == 'a' || ch == 'e' || ch == 'i' || ch == 'o' || ch == 'u') {  
     printf("%c is vowel
", ch);  
 }  
 else {  
     printf("%c is consonant
", ch);  
 }
Comment

PREVIOUS NEXT
Code Example
C :: fgets remove newline 
C :: remove string from string c 
C :: compare c strings 
C :: struct main function c in unix 
C :: bd number regex 
C :: c check first character of string 
C :: signal function c 
C :: Write a 64-bit program in assembly that prints Hello, world in .asm 
C :: c loop 
C :: how to call function after some time in vue.js 
C :: declare variables arduino 
C :: variables in c 
C :: string array in c 
C :: turn a char array into double C 
C :: How to copy one string into another in C 
C :: 2d array in c 
C :: delay in c programming for linux 
C :: print only last 3 number float in c 
C :: stack and heap memorym in ram 
C :: c comment 
C :: string in c 
C :: C Syntax of goto Statement 
C :: national festivals of india in hindi 
C :: sOY wapo ya lo c 
C :: c program boilerplate 
C :: error: argument 1 range [18446744071562067968, 18446744073709551615] exceeds maximum object size 9223372036854775807 [-werror=alloc-size-larger-than=] 
C :: c ausgabe 
C :: jock cranley 
C :: change data type inline in c 
C :: C static libraries creation 
ADD CONTENT
Topic
Content
Source link
Name
6+3 =