Programming Exercises: Arrays and Methods

These are some programming exercises that can test your brain. These programming exercises are generic and simple that could be done using any programming language you like. These involves problems that Arrays and Methods should be applied.

  1. Write a program that prompts a professor to input grades for five different courses for 10 students. Prompt the professor to enter one grade at a time using prompt “Enter grades for student #1: “. Verify that the professor enters only A,B,C,D or F for grades (A is the highest grade, F fail). Use variables for student numbers (1 through 10) and grade numbers (1 through 5). Create a menu for Search. If the user select search it will prompt for a letter corresponding to grade. Display all students with the selected grade. If the user just enter, display all students with their grade sorted highest to lowest.
  2. Write a program that displays a multiple choice quiz of 10 questions with topics related to your course. Each question has one correct answer and three possible answers. Verify that the users enters only A, B, or C as the answer. Store correct answers in an array. Store the user’s answers in a second array. If the user responds to a question correctly, display “Correct!”; otherwise display “The correct answer is” and the letter of the correct answers. After showing the answer, prompt the user if he want to take the exam again.
  3. Write a program that lets the user enter numbers (1 through 9) one at a time, and then prints the numbers the user entered. Allow the user to enter up to 10 numbers. If the user tries to enter a 11th number, display a message that no more numbers can be entered. Allows the user to delete a number, which is the user will be prompt to specify which number to remove. Verify that the user enters a valid number (1 through 9) and then change that removed number in array to 0. Include a menu that shows the options to enter, remove and display a number or quit program.
  4. Write program for student record. Add menu for [1] Add, [2] Modify, [3] Display and [4] Quit program. When the user select 1, it will allow the user to enter new student with ID number and last name, it should not accept more than 10 students. After adding a new student, the program will go back to the menu. If user choose modify the program will prompt to specify what student ID to modify, otherwise display student not found, then return to menu. If student ID found, ask for new ID and Last name. If the user doesn’t enter anything no changes will be made and will bring you back to the menu. Display will just display all students with their corresponding ID and Last names.
  5. Create a program that stores 10 products and their corresponding prices in an array, such as 2.34, 7.89, 1.34, and so on. Display the sum of all the prices. Display all products which values less than 5.00. Calculate the average of the prices, and display all values higher than the calculated average value. You must create separate methods for all the computations. Include a menu that will prompt user to Sort the products by price or alphabetically. Display all products with their prices according to what type of sorting the user choose.

 

George Dan Gil

Programmer, Database Designer and Administrator for Web Applications. Who loves to read and write interesting topics.You can email me at neverender24@gmail.com

  • Nuestro organismo convierte enzimas para producir
    energía no utilizada glucosa en depósitos de grasas que se almacenan en distintas partes
    del cuerpo. http://Www.Dorperoverleg.nl/gastenboek

  • Computers are getting better and better in the manner that they function these days.
    There’s no wonder that people use them in their daily lives
    now. If you are prepared to learn about how exactly an iPad can make your life easier,
    read on to learn about all the options.
    If you are looking into purchasing an iPad you need to look at
    a few what to get the best price possible. If you want to use the iPad outside of your
    home or office, then you will want to purchase the more expensive version that includes 3g as well as WIFI.

    Battery life is normally shorter when working with heavier applications like movies and games.
    Adjusting screen brightness can help to lengthen your battery
    pack life. You are able to enjoy your iPad without requiring it to be on the
    brightest environment. Avoid being fooled into
    convinced that iPads are just useful if you are into gaming or entertainment.
    There is absolutely an application for whatever you can possibly think about.
    This includes home organization applications like personal
    costs as well as formula books, calculators, and other things possible.

    Before you purchase an app, you should check out any alternatives that are cheaper or even free.
    Often popular apps have free light variations that are simply the identical thing except;
    They include advertisements. If this won’t bother you, it could be a
    good way to save a few bucks.
    You should use shortcuts for messages. Just tap your space club 2 times as you
    type a sentence, and an interval and space can look by the end.

    You won’t need to labor over your messages like this.

  • I would like to thank you for the efforts you have put in writing this site.
    I really hope to see the same high-grade blog posts by you in the future as well.

    In fact, your creative writing abilities has encouraged
    me to get my own, personal site now 😉

  • May I just say what a comfort to discover someone that truly understands what they are
    talking about over the internet. You certainly realize how to bring an issue to light and make it important.
    Morre people ought to check this out and understand this side of your
    story. I can’t believe you’re not more popular since you most certainly have the gift.

  • Excellent site you have here but I was wanting to know if you knew
    of any discussion boards that cover the same topics talked about
    in this article? I’d really like to be a part of online community where I can get feedback from
    other knowledgeable people that share the same interest.
    If you have any recommendations, please let me know.
    Many thanks!

  • Minerais – potássio aumentar a absorção das células
    e melhora a capacidade de memorização; magnésio – atual przeciwstresowo, facilita a memorização ocorre nas sementes, kiełkach, cacau, as nozes;
    bohr, estimulante da atividade cerebral, zinco -contra a demência, aumenta a eficiência de propriedade intelectual. http://ploskas.com/UserProfile/tabid/61/userId/789/language/el-GR/Default.aspx

  • Esto es simplemente increíble, nunca pensé que
    podría conseguir resultados como este en tan poco tiempo. http://nezumi.my-svr.com/userinfo.php?uid=2114983

  • Jim

    No feita, estou trabalhando nesse itinerário (dado) mais que de que maneira alimentar certo página pessoal constrição ninharia. http://Letshelp.ir/HEJMaxine4

  • Menos bondosos gastos, podendo distanciar sua marca do que modo 100 (cem) por cento próprio. http://sell.swaida.com/author/sandra25t35/

  • Have you ever considered creating an ebook or guest authoring on other sites?
    I have a blog based on the same subjects you discuss and would really like to
    have you share some stories/information. I know my subscribers would enjoy your work.
    If you are even remotely interested, feel free to send me an email.

  • You will not likely feel anny cravings for an extended time annd competent
    to avoid anny extra calories. The workout can take about twenty or sso minutes to accomplish and also yyou just need to do that thrice
    every week this also iss a loot better than your family cardio workout.

    Chitosan can be a natural substance (that has a structurre seems like cellulose) called “the fat magnet” as a
    result oof its capability work as a lipid bindser on the rate to to significantly iits weight. http://judahfukz360blog.pointblog.net/Do-Not-Rely-On-Muscle-Building-Supplements-Too-Much-2865178

  • I relish, lead to I discovered just what I used to be taking a look for.
    You have ended my 4 day long hunt! God Bless you man. Have a great day.
    Bye

  • Thanks for the marvelous posting! I seriously enjoyed reading it, you may be a great author.
    I will be sure to bookmark your blog and will often come back from now on.
    I want to encourage yourself to continue your great writing, have a nice evening!

  • A autonomia único traduz-se no aplicação com opiniões porém
    atividades psicológicas, construídos na ação sujeito-meio,
    adequado a regulação da textual conduta, de tal maneira no
    que se refere ao representação de quefazeres porém caso decisão dentre distúrbios imediatos bem como, a enclausuramento do que
    decisões resto abrangentes no rastro de a diretriz da sustentação empregados
    contudo social. http://istanbulescortalem.com/ads/spartan-daily/

  • Ao compararmos a dor com possuir uma marca indesejável ao
    respectivo estrutura física, prestando farto sentimentos desagradáveis todo mundo os dias, podemos
    dizer sem dúvidas que a remorso da exoneração da estigma nem cosmético definitiva
    a laser bem como integralmente suportável. http://bbs.fzuky.com/space-uid-745974.html

  • Appreciating the persistence you put into your blog and detailed information you
    offer. It’s great to come across a blog every once in a while that isn’t the same old rehashed information. Fantastic read!
    I’ve bookmarked your site and I’m including your RSS feeds
    to my Google account.

  • Students that attempted tⲟ reality verify tһis statement աith teachers аnd otheг students of
    Italian heritage Һave been disappointed, dᥙе to the fact no օne seemеɗ to know about wearing red on St.
    Patrick’s Dаy.

  • Se os nubentes não escolherem regime diverso no pacto antenupcial,
    ou se regime adotado for nulo ou ineficaz, este será
    regime estabelecido por lei. http://Forum.Sc-Dns.ru/profile.php?id=327166

  • They allows you tto feel fuller aiding you eat fewer your next meal while they leave you
    feeling satisfied. You’ll understand the common myths related to most los weight fast diets.
    Youu must eat fewer than your burn in caalories annd energy. http://gerardonbob469blog.shotblogs.com/rather-of-finest-bodybuilding-supplements-splurging-1052611

  • Assim que só meninas (pouco do que 1%) das seres humanos que se dedicam ao empreendedorismo em rede tornam-se
    milionárias. http://datingwiki.org/User:RomaCaskey460

  • Você também é possível que buscar outras lojas de
    rouparia femininas escrevendo esta termo chave no google, na procura orgânica e também até
    mesmo nos backlinks patrocinados ira brotar uma infinidade de lojas que vendem vestidos da moda e também muito
    mais, aproveite nossa pista e também compre agora mesmo trajes da voga sem sair de casa
    , com conforto comodidade e também facilidade! e também hoje retornamento numa tempo de aquisição que http://aax.us/forums/profile.php?id=28872

  • Alwaus keep in mind that cut of diamond means shape and quality.
    It happens to be crjtical for get something that doesn’t only looks magnificent
    but that shows the girl’s individuality. But unfortunately collection available from online jwwelry
    stores don’t impress you, try searching the ring on other stores tha include special
    discounted offer about the acquiring diamond rings. http://videofriend99b.blogocial.com/Tell-Him-You-Like-Him-With-A-Diamond-Ring-3347562

  • Good way of telling, and good article to obtain information regarding my presentation subject,
    which i am going to deliver in school.

  • Excellent way of telling, and pleasant article to obtain information
    regarding my presentation topic, which i am going to present in university.

  • I leave a leave a response each time I like a article on a site
    or if I have something to add to the conversation.
    It is caused by the fire displayed in the post I read.
    And after this post Programming Exercises: Arrays and Methods – Anytch.com.

    I was excited enough to post a leave a responsea response 😉 I do have 2 questions for you if it’s okay.
    Is it simply me or do some of the comments appear like they
    are written by brain dead visitors? 😛 And, if you are
    writing at additional online social sites, I’d like to keep up with
    anything new you have to post. Would you list all of your community pages like your
    twitter feed, Facebook page or linkedin profile?

  • Se sobre um chance vossa mercê examinar a expectativa desde que termina comunicar-se aluguel comparsa no inicial mecânico,
    esqueça. http://wiki.fastpbx.com/User:AllieMileham53

  • Estamos preparando algum post especial sobre Avicis, deve arrolar-se no fachada dentro de
    rápido (toda vez avisamos lá no Facebook porém
    no Twitter apesar de que possui espírito menino por presentemente). http://elom.tv/groups/%e2%86%92-calvicie-possui-medicacao/

  • Somos deveras rigorosos acima de exposição a qualquer gênero com rumo no entanto aparência desde renda biscate que recomendamos. http://classifiedway.com/ads/pois-que-apoderar-se-fortuna-na-internet-nalgum-2016-sem-truques/

  • Na direção de determinado ganhos maior vassuncê pode tingir lhe forma através de
    as cores que deseja julgamento nas vestuário. http://ssamgfnb.com/board_pnux26/32915

  • It’s remarkable designed for me to have a web site, which is helpful for my knowledge.
    thanks admin

  • me concebeu essa entrevista sei que Valdemir Ferreira estou fazendo um trabalho sobre conflito no plaino no sul e também sudeste do Pará e também é bastante bom descobrir que foi durante a observação
    da Ceia da Páscoa (Mateus 26.17-19; Marcos 14.12-16; Lucas 22.7-13) assim trazendo as
    verdades tipológicas da Ceia da Páscoa para a Ceia do http://www.brezje.si/UserProfile/tabid/57/userId/231513/Default.aspx

  • Appreciating the time and energy you put into your website and in depth information you present.
    It’s great to come across a blog every once in a while that
    isn’t the same old rehashed information. Excellent read!
    I’ve saved your site and I’m adding your RSS feeds to my Google account.

  • Have you ever considered writing an ebook or guest authoring on other websites?

    I have a blog based on the same information you discuss and would really like to have you share some stories/information. I know my audience would enjoy your work.
    If you are even remotely interested, feel free to send me an email.

  • Laser utilizado no dispositivo estimula os folículos capilares para apressar seu incremento. http://Lactose.at/content/link.php?url=http://tbtmradio.com

  • As cores só vem com os nomes na caixa, porém descobri entalhado em grave relevo
    no final de cada lápis uma numeração, não sei se isso é
    igual em todas e cada uma das caixas, ou é só marcação de traço de
    produção como código de embocadura, enfim da pra se dobrar, pois as cores da mina são bem aproximado da pintura da
    madeira. http://www.lztdsb.cc/space-uid-30613.html

  • Além dos florais como secção da única unha decorada,
    desenhos geométricos, borboletas têm seu espaço garantido nas unhas dos pés. http://ksw.ir/Default.aspx?tabid=43&userId=5280

  • Nosso organização sofrem mudanças fisiológicas com passar do tempo, assim sendo, a vetustez se torna parte da natureza da nossa vida. http://Hotelescuelalascarolinas.com/user-profile/userid/35976.aspx

  • I contracted a local business to complete the
    SEO and after a few weeks the blog had gone down in traffic, not a good sign I take it?

    Will definitely be coming back, ’tis a great site!

  • It’s an remarkable post in favor of all the internet users;
    they will obtain advantage from it I am sure.

  • Cheap financial loans can continually be obtained actually easily using
    the within the mode. It was being as the Place Bank ran into rung a bell. https://pastelink.net/4n2a

  • Hi there it’s me, I am also visiting this site daily, this web site
    is actually pleasant and the users are actually sharing good thoughts.

  • Hello Dear, are you really visiting this site on a
    regular basis, if so then you woll absolutely take nice
    knowledge.

  • Hi to every one, the contents present at this
    site are really remarkable for people knowledge, well, keep up the good work fellows.

  • Good post. I learn something totally new and challenging on sites I stumbleupon everyday.
    It will always be exciting to read content from other authors and practice something from other
    sites.

  • now

    Take your time and find the right method that works
    for you. Generally E-coli take shelter in the digestive system of human beings, mostly in the intestines.
    Fortunately, nowadays you do not need to be like an emperor to adopt an indoor wall mounted waterfall.

  • Sal

    A responsabilidade social assume importante papel realmente social e
    também demonstra obrigação de compensar os danos fabricados pelo sujeito
    ofensor da lei. http://www2.Thaisp.org/Default.aspx?tabid=445&userId=93587&language=en-US

  • An interesting discussion is worth comment.
    There’s no doubt that that you need to publish more on this subject, it might not
    be a taboo subject but usually people don’t speak about these issues.
    To the next! All the best!!

  • Hllo terrific blog! Dooes running а blog ⅼike tɦіѕ take a great
    deal of woгk? I have absolսtely no understanding ⲟf coding but I ᴡаs hoping to start mʏ own blog soon. Anyᴡay, shߋuld yoᥙ have any suggestions oг tips fоr
    new blog owners рlease share. I understand this iѕ оff subject but Ⅰ just needᥱⅾ
    to аsk. Ƭhank you!

  • It’s amazing to visit this web site and reading the views of all colleagues on the topic of this post,
    while I am also keen of getting know-how.

  • There are many medical commplications in connection with it.
    You will reach enjoy your smacks iff you can’t keep unhealthy ffoods at home.
    Chitosan is often a natural substance (which has a structure seems like cellulose)
    referred tto as “the fat magnet” as a consequence of its chance too behave as a lipid binder with the rate in ordr tto 5
    to significhantly its weight. http://gradynbpc469blog.shotblogs.com/how-to-drop-weight-fast-now-818637

  • sex

    It’s truly a nice and helpful piece of information. I am happy that you
    shared this helpful information with us. Please keep us up to date like this.
    Thank you for sharing.

  • I like reading through an article that will make people think.
    Also, thank you for allowing me to comment!

  • What’s up tօ all, for thhe reason that Ⅰ am in fat keren of reading this website’ѕ post
    to bе updated daily. ӏt contains pleasanjt material.

  • Hi there to every body, it’s my first go to see of this website; this blog includes
    awesome and really good information in favor of readers.

  • Obesidade vegetal hidrogenada: é tipo de obesidade com consumo de
    maior afluência no menu da população brasileira. http://timehug.com/User-Profile/userId/776.aspx

  • Thanks for finally writing about >Programming Exercises: Arrays
    and Methods – Anytch.com <Loved it! http://csgodepositsizsiteler2017.blogspot.com

  • Great items from you, man. I have be mindful your stuff prior to and you’re simply
    too magnificent. I actually like what you’ve acquired right here, really like what you are stating and
    the way in which by which you are saying it. You’re making it entertaining and you still care for to keep
    it wise. I cant wait to read far more from you.
    That is actually a terrific web site.

  • Jonas Israel, Chief Executive Officer
    Jonas Israel has beyond 2 decades within working experience at the
    wooden market. Jonas setup McCorry during 1996. Prior to doing this, Jonas was in command of a Malaysian sawmill cum moulding.

  • A popularidade que cada casino online cobija é praticamente correspondente ao sucesso do mesmo junto
    dos jogadores, desta forma, se as suas características
    são singulares, se há uma extensa segurança, copiosos jogos disponíveis e prémios interessantes, portanto
    significa que é uma das melhores opções para os jogadores. http://www.rockclimbers.org/User:JoeBerrios

  • Hi there, its nice post about media print, we all be aware of media is
    a wonderful source of information.

  • Simply desire to say your article is as astounding. The clarity in your post is just cool and i
    can assume you’re an expert on this subject.
    Well with your permission allow me to grab your RSS feed to keep up to date with forthcoming post.
    Thanks a million and please keep up the enjoyable work.

  • Thanks for every other fantastic article. The place else may anyone get
    that kind of info in such a perfect approach of writing? I’ve a presentation next week, and
    I am on the search for such information.

  • hello!,I love your writing so much! share we be in contact extra about your article on AOL?
    I need an expert in this area to unravel my problem.
    May be that’s you! Looking forward to see
    you.

  • Have you ever considered about including a little bit more than just your articles?
    I mean, what you say is valuable and everything. However just imagine if you added
    some great visuals or video clips to give your posts more, “pop”!

    Your content is excellent but with images and video clips, this site
    could definitely be one of the best in its field. Excellent blog!

  • Ankit Jain quit a handsomely rewarding funding banking job to make his living by
    skilled poker. Everyone was vying to win the most important prizepool of this Saturday night tournament and in fact there were
    quite a lot of gamers who had flown in to take part
    in just this one tournament! This listing of stay poker venues will inform you where you possibly can in the
    intervening time discover a recreation. The licensing and regulatory our
    bodies act like a watchdog to see that all on-line gaming operators are performing their business with complete
    honesty, and giving the gamers their due. Based on Perry4Law , the exclusive techno legal
    ICT law agency of India, to start with, any online poker
    web site of India that needs to have interaction in authorized business should
    comply with Indian legal guidelines like Indian Penal
    Code, 1860, Code of Prison Process, 1973, Indian Info Technology Act, 2000, the Public Playing
    Act, 1867, International Alternate Management Act (FEMA)
    1999, and many others.

    While there are many online poker sites, the important thing to making sure that you
    have an fulfilling and doubtlessly worthwhile online poker expertise is choosing a superb on-line poker site that readily settle for Indian gamers and make it easy to
    deposit. Vous trouverez également les règles et le classement des mains pour le Texas Hold’em, l’Omaha,
    le Stud, le Badugi et d’autres jeux de poker. The entire major
    ewallet services equivalent to Moneybookers (Skrill), Neteller, and ClickandBuy operate in India and funding and withdrawing from your poker account by these choices is just as
    easy as in different countries.

    Let’s take with no consideration that India competing with Macau is as seemingly as the sun scorching the sky and Santa Claus coming to save us.

    Online is where this poker factor is going to exist right here.
    Before he knew it, he was making a lot more cash playing
    poker than he was at his day job as a enterprise
    growth supervisor. This case has additional being made
    complicated due to the law making arrangement between the States and Centre as prescribed by Indian Constitution.
    The favourite two types of the Poker on-line card game is Texas Hold’em
    and Five card stud.

    Barely completely different from Texas Holdem, Omaha is preferred amongst poker video games
    for the challenge it affords. KhelPlay Poker Blog brings you the information on enjoying online poker in India.

    Rs 3.36 crore prize money has been declared for the winners of this unique league, which
    would contain a lot of mind power, calculations and luck.
    The two corporations have shaped an equal joint venture to develop the web poker market in India, with Mojo Games providing the iGaming know-how, fee processing, again workplace and advertising and marketing assist solutions for the network.

    Launched in Oct 2013, the Amator is the result of detailed legal research by Vipin Chaudhary, a passionate poker
    player and lawyer by occupation. No Limit, Pot Limit, Fastened Limit and
    Heads Up, all versions of Texas Holdem poker games are open multiple tables via a number of on-line poker tournaments.
    These chips comply with a two-color pattern and are printed with the patented Cartamundi crown image.
    Now click on deal and the dealer will produce four cards,
    face-up in the middle of the table. The case was adequate to give Nagaland
    the boldness that its Prohibition of Gambling and Promotion and Regulation of On-line Games
    of Skill Act, 2016 would stand as much as any problem below federal regulation.

    Buy-ins on the India Poker Championship, held at the (floating) Deltin Royale in Goa, are Rs 5,000 to 30,000.
    Travellers can get pleasure from non-stop Texas Hold’em or pot
    limit Omaha in poker rooms around India. You may attempt your hand at Texas Hold’em Poker, Pot Limit Omaha Poker, Single Table Match Poker, Free Poker, Free roll Poker Tournaments, Sit N Go Poker, Ring
    Poker, Multi Desk Poker Tournaments, and much more!
    Knights, Barons and High Citizens all obtain lavish cash prizes for
    his or her on-line poker skills.

    Ankit, who has now been enjoying for the last four years
    often, brings residence no less than 2 Lakhs a month by way
    of his prowess on the poker tables. It officially took its title when it was held in 2010 at On line
    casino Royale in Goa and is likely one of the most
    popular Indian poker leagues. The selection of Indian Supreme Courtroom may set up legality or illegality of on-line video games like rummy,
    poker, and so forth. The Supreme Courtroom Thursday put rummy web sites out of
    the ambit of its scrutiny and chose to concentrate on legality
    of table rummy performed in golf equipment.

    That is why the World Collection of Poker draws in hundreds of players who compete for millions of dollars (fun truth:
    the last 7 champions had been all below 30). Coming again to
    your fundamental query-I began looking for on-line poker softwares,
    then I obtained right here to know in regards to the one and solely
    POKERSTARS. Having been certified from InfySec Security labs for truthful play and Random
    Number Generator (RNG) to make sure card sequences
    are unpredictable, non-repeatable and uniformly distributed.

    Nonetheless, we aren’t legal professionals and nothing we state right here
    needs to be thought of legal recommendation. Our web
    site is without doubt one of the most renowned Indian Poker websites which offer
    you a chance to Play Poker On-line with real money. Being a poker
    player myself, and having performed repeatedly on almost all online poker websites globally
    since their inception typically, it’s imperative for me to ensure that the cardboard
    room I am enjoying on conforms to the laws of the land – it is simply good to be secure!

    As per Indian Constitution gambling comes inside State
    topic, however, the aforementioned central Act is relevant in all of the
    States which shouldn’t have any specific playing laws.
    Primarily it introduces a regulated method to licensing
    of online operators providing different types of games –
    pinpointing them as talent-based mostly moderately than playing-based regardless of how cash
    is actually gained. But whereas western players can sign up
    and play for real cash at these online poker rooms with none restrictions, it’s not
    so clear reduce for players in India.

    The Match that had its inaugural event in May 2012 has gone robust and regular to revamp the poker scene in India.
    Nevertheless, till then the stakeholders must consider
    numerous related legal guidelines of India especially the
    cyber law due diligence necessities (PDF).
    Beforehand, Kerala refused permission to Future Gaming Options
    India Personal Ltd to advertise Nagaland lotteries in the state.
    Welcome to Adda52 DWELL, Rs one hundred bonus has been credited to your account
    to play on-line poker at Adda52. http://www.trapworld.com/groups/play-on-line-poker-video-games-in-india-at-kqpoker-com-345741969/