{"id":3972,"date":"2018-02-06T18:18:57","date_gmt":"2018-02-06T17:18:57","guid":{"rendered":"http:\/\/liceocuneo.it\/oddenino\/?p=3972"},"modified":"2018-02-06T18:20:13","modified_gmt":"2018-02-06T17:20:13","slug":"supermercato-c","status":"publish","type":"post","link":"https:\/\/liceocuneo.it\/oddenino\/supermercato-c\/","title":{"rendered":"supermercato.c"},"content":{"rendered":"<p>Simulare un supermercato.<\/p>\n<p>Il menu deve essere fatto cos\u00ec:<br \/>\n=========================<br \/>\nProdotti<br \/>\n=========================<br \/>\n1-Uova<br \/>\n2-Latte<br \/>\n3-Carne<br \/>\n4-Formaggio<br \/>\n5-Pane<br \/>\n0-Paga ed esci<br \/>\n=========================<\/p>\n<p>#define UOVA 0.15<br \/>\n#define LATTE 1.25<br \/>\n#define CARNE 12.50<br \/>\n#define FORMAGGIO 7.45<br \/>\n#define PANE 1.10<\/p>\n<p>Deve esserci una variabile globale float &#8220;totale&#8221;<br \/>\nIl main() deve gestire l&#8217;input della scelta dal menu mediante un ciclo do-while e uno switch<br \/>\nLo switch deve richiamare le procedure &#8220;compraUova&#8221;, &#8220;compraLatte&#8221;, etc.<br \/>\nOgni singola procedura deve chiedere il quantitativo del prodotto che si vuole acquistare e calcolare il prezzo del prodotto, che deve essere sommato a &#8220;totale&#8221;.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Simulare un supermercato. Il menu deve essere fatto cos\u00ec: ========================= Prodotti ========================= 1-Uova 2-Latte 3-Carne 4-Formaggio 5-Pane 0-Paga ed esci ========================= #define UOVA 0.15 #define LATTE 1.25 #define CARNE 12.50 #define FORMAGGIO 7.45 #define PANE 1.10 Deve esserci una variabile globale float &#8220;totale&#8221; Il main() deve gestire l&#8217;input della scelta dal menu mediante un ciclo &hellip; <a href=\"https:\/\/liceocuneo.it\/oddenino\/supermercato-c\/\" class=\"more-link\">Continua a leggere <span class=\"screen-reader-text\">supermercato.c<\/span><\/a><\/p>\n","protected":false},"author":4,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12],"tags":[],"class_list":["post-3972","post","type-post","status-publish","format-standard","hentry","category-informatica"],"_links":{"self":[{"href":"https:\/\/liceocuneo.it\/oddenino\/wp-json\/wp\/v2\/posts\/3972","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/liceocuneo.it\/oddenino\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/liceocuneo.it\/oddenino\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/liceocuneo.it\/oddenino\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/liceocuneo.it\/oddenino\/wp-json\/wp\/v2\/comments?post=3972"}],"version-history":[{"count":0,"href":"https:\/\/liceocuneo.it\/oddenino\/wp-json\/wp\/v2\/posts\/3972\/revisions"}],"wp:attachment":[{"href":"https:\/\/liceocuneo.it\/oddenino\/wp-json\/wp\/v2\/media?parent=3972"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/liceocuneo.it\/oddenino\/wp-json\/wp\/v2\/categories?post=3972"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/liceocuneo.it\/oddenino\/wp-json\/wp\/v2\/tags?post=3972"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}