Académique Documents
Professionnel Documents
Culture Documents
using System;
int i;
Console.Write("-----------------------------------------\n");
arr[i] = Convert.ToInt32(Console.ReadLine());
Console.Write("\n");
..
using System;
public class Exercise7
string str;
Console.Write("--------------------------------------------------------------------\n");
str = Console.ReadLine();
l=str.Length;
while(i<l)
alp++;
digit++;
else
splch++;
}
i++;
,.
using System;
string str;
Console.Write("----------------------------------------------\n");
str = Console.ReadLine();
vowel = 0;
cons = 0;
len = str.Length;
{
if(str[i] =='a' || str[i]=='e' || str[i]=='i' || str[i]=='o' || str[i]=='u' || str[i]=='A' || str[i]=='E' ||
str[i]=='I' || str[i]=='O' || str[i]=='U')
vowel++;
cons++;
using System;
string str;
int i = 0, max,l;
int ascii;
Console.Write("--------------------------------------------------\n");
str = Console.ReadLine();
l=str.Length;
for(i=0; i<255; i++) //Set frequency of all characters to 0
ch_fre[i] = 0;
i=0;
while(i<l)
ascii = (int)str[i];
ch_fre[ascii] += 1;
i++;
// Console.Write("{0} ",(char)65);
max = 0;
if(i!=32)
max = i;
Console.Write("The Highest frequency of character '{0}' is appearing for number of times : {1}
\n\n", (char)max, ch_fre[max]);