diff --git a/C/program-56/README.md b/C/program-56/README.md new file mode 100644 index 00000000..cdda9057 --- /dev/null +++ b/C/program-56/README.md @@ -0,0 +1,4 @@ +Program 56 + + +Write a program in C to calculate the number of vowels and consonants in a string. diff --git a/C/program-56/program.c b/C/program-56/program.c new file mode 100644 index 00000000..12d30de1 --- /dev/null +++ b/C/program-56/program.c @@ -0,0 +1,15 @@ +#include + +int main() { + char ch[100]; + int i,count; + printf("Enter the string \n"); + fgets(ch,100,stdin); + for(i=0;ch[i]!='\0';i++) + { + if(ch[i]=='a'||ch[i]=='e'||ch[i]=='i'||ch[i]=='o'||ch[i]=='u'||ch[i]=='A'||ch[i]=='E'||ch[i]=='I'||ch[i]=='O'||ch[i]=='U') + count++; + } + printf("Number of vowels are %d \n",count); + printf("Number of consonants are %d",(i-count)); +} diff --git a/Javascript/program-2/read.md b/Javascript/program-2/read.md index 4d25a1a4..39f1e330 100644 --- a/Javascript/program-2/read.md +++ b/Javascript/program-2/read.md @@ -1,2 +1,2 @@ -# Program-1 +# Program-2 ## This is a javascript program for string operations diff --git a/Javascript/program-3/armstrong.html b/Javascript/program-3/armstrong.html new file mode 100644 index 00000000..fe1188a2 --- /dev/null +++ b/Javascript/program-3/armstrong.html @@ -0,0 +1,20 @@ + +ARMSTRONG NUMBER + + + + diff --git a/Javascript/program-3/read.md b/Javascript/program-3/read.md new file mode 100644 index 00000000..36e6ee89 --- /dev/null +++ b/Javascript/program-3/read.md @@ -0,0 +1,3 @@ +# Program-3 +## This is a javascript program for armstrong + diff --git a/Javascript/program-4/palindrome.html b/Javascript/program-4/palindrome.html new file mode 100644 index 00000000..52145b20 --- /dev/null +++ b/Javascript/program-4/palindrome.html @@ -0,0 +1,55 @@ + + + + Check Palindrome with JavaScript Program + + + + +
+ + +
+ + \ No newline at end of file diff --git a/Javascript/program-4/read.md b/Javascript/program-4/read.md new file mode 100644 index 00000000..80979ba9 --- /dev/null +++ b/Javascript/program-4/read.md @@ -0,0 +1,3 @@ +# Program-4 +## This is a javascript program for palindrome +