Upload
dumbledoreaaaa
View
216
Download
0
Embed Size (px)
Citation preview
8/14/2019 Lab 6 - An Acronym Generator
1/2
CS 170 Section _03_ Name_Mayre Mercedes Jenkins_
Lab 6 An Acronym Generator
Due: No later than the beginning of class, Wed. 10/3/12
Reca !rom t"e cass t"e #ro$ram %e %rote to decode a se&'ence o! ASC(( n'mbers into t"e strin$ t"at
t"e n'mbers re#resent) *e %ant to %rite a simiar #ro$ram t"at %i #rom#t t"e 'ser !or a strin$ and t"en
#rint o't t"e acronym !or t"e strin$) +An acronym is a %ord !ormed !orm t"e !irst etters o! eac" %ord o! a#"rase),
-or e.am#e/ i! t"e 'ser in#'ts t"e strin$ b'siness acco'ntin$ de#artment/ t"e o't#'t o! yo'r #ro$rams"o'd be t"e strin$ 2A) 4"e acronym s"o'd be #rinted 'sin$ ca#ita etters) 5ere is t"e a$orit"m
%e %i 'se
Ste# 1, rom#t t"e 'ser to enter a strin$)
Ste# 8, (nitiai9e an acc'm'ator strin$
Ste# 3, S#it t"e strin$ into a ist o! strin$sSte# :, Loo# once !or eac" strin$ in t"e ist
Ste# ;, aste t"e !irst etter o! t"e c'rrent strin$ !rom t"e ist onto t"e acc'm'ator strin$Ste# 6, Con
8/14/2019 Lab 6 - An Acronym Generator
2/2
statement t"at e.tracts t"e !irst etter o! t"e strin$ stored in t"e oo# inde. and stores it in a