im a first year comp sci student who slept through the entire first semester and now i have an assignment to make a text analysis program in c# and i dont even know where to start
here is the assignment
The program should report the following about a user input sentence:
Number of sentences entered
Number of vowels
Number of consonants
Number of upper case letters
Number of lower case letters
The frequency of individual letters
any advice on where to start other than to kill myself would be great
Perhaps start by reading in your assigned book, and also the slides from the lectures.
My advice would be to change majors if you can't figure this out in C#.
>>58114351
If/else statements and for-loops my friend
>>58114351
Should only take like 15 mins to write. Super easy program. Just take user input, iterate through each character in the string once and calculate metrics on it from that.
well no i can figure it out but i left it until the last few hours before its due because im autistic
>>58114394> >58114385
thank you
string sentence = "niggers. nigger? nigger." ;
int amount_of_sentences = sentence.Split(' ')[0];
char[] v = "aeiou".ToCharArray();
int vowels = 0;
int constanants = 0;
int uppercase = 0;
int lowercase = 0;
foreach(char c in sentence.ToCharArray()){
if (v.Contains(c)){
vowels++;
}
else{
constanants++;
}
if (c.ToLower() == c){
lowercase++;
else{
uppercase++;
}
}
figure the last one out yourself
>>58114351
>im
>>>/twitter/ is that way.