[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y ] [Search | Free Show | Home]

/g/ please help with c#

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 9
Thread images: 2

File: c#.png (5KB, 340x340px) Image search: [Google]
c#.png
5KB, 340x340px
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.
>>
File: 1479575134770.jpg (30KB, 456x402px) Image search: [Google]
1479575134770.jpg
30KB, 456x402px
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.
Thread posts: 9
Thread images: 2


[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y] [Search | Top | Home]

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
All trademarks and copyrights on this page are owned by their respective parties.
Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.