{"id":299,"date":"2012-09-03T11:41:12","date_gmt":"2012-09-03T04:41:12","guid":{"rendered":"http:\/\/blog.kusumoto.co\/?p=299"},"modified":"2012-09-03T11:41:49","modified_gmt":"2012-09-03T04:41:49","slug":"computer-programming-test-answer-methodarray","status":"publish","type":"post","link":"https:\/\/oldblog.kusumotolab.com\/?p=299","title":{"rendered":"Computer Programming Test Answer [Method,Array]"},"content":{"rendered":"<p><a href=\"http:\/\/img.kusumoto.co\/show\/457\" target=\"_blank\"><img decoding=\"async\" src=\"http:\/\/img.kusumoto.co\/i\/gr.png\" alt=\"Host by img.kusumoto.co\" \/><\/a><\/p>\n<pre lang=\"c\">\r\n#include <stdio.h>\r\nmain() {\r\n\t\r\nint a,b,c;\r\nfloat d[3],e[3],g=0,z=0;\r\nchar f[3] = {'a','b','c'};\r\n\r\nfor (a=1;a<=2;a++) {\r\n\tprintf(\"Person no. %d \\n\",a);\r\n\tfor (b=1;b<=3;b++) {\r\n\t\tprintf(\"Enter amount of piece %c >>> \",f[b-1]);\r\n\t\tscanf(\"%f\",&d[b-1]);\r\n\t\tprintf(\"Enter price<baht> >>> \");\r\n\t\tscanf(\"%f\",&e[b-1]);\r\n\t\tg = g+(e[b-1]*d[b-1]);\r\n\t\tprintf(\"Price of %c is %.2f\\n\",f[b-1],e[b-1]*d[b-1]);\r\n\t}\r\n\tprintf(\"--------- Total's person 1 %.2f-------------\\n\",g);\r\n\tz = z+g;\r\n\t}\r\nprintf(\"************ Two person are %.2f******************\\n\",z);\r\n}\r\n<\/pre>\n<p><a href=\"http:\/\/img.kusumoto.co\/show\/458\" target=\"_blank\"><img decoding=\"async\" src=\"http:\/\/img.kusumoto.co\/i\/CS8.png\" alt=\"Host by img.kusumoto.co\" \/><\/a><\/p>\n<pre lang=\"c\">#include <stdio.h>\r\nint function1 (int x,int y) {\r\n\tint c;\r\n\tc = (x+y)*100;\r\n\treturn(c);\r\n}\r\n\r\nmain() {\r\n\tint a,x,y;\r\n\tprintf(\"Enter Number I >>>> \");\r\n\tscanf(\"%d\",&x);\r\n\tprintf(\"Enter Number II >>>>>\");\r\n\tscanf(\"%d\",&y);\r\n\ta = function1(x,y);\r\n\tif (x+y>=50) {\r\n\t\t\r\n\t\tprintf(\"Function 1 (sum*100) is %d\\n\",a);\r\n\t} \r\n}\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>#include main() { int a,b,c; float d[3],e[3],g=0,z=0; char f[3] = {&#8216;a&#8217;,&#8217;b&#8217;,&#8217;c&#8217;}; for (a=1;a=50) { printf(&#8220;Function 1 (sum*100) is %d\\n&#8221;,a); } }<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"footnotes":"","jetpack_publicize_message":"","jetpack_is_tweetstorm":false,"jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":[]},"categories":[43,9],"tags":[],"class_list":["post-299","post","type-post","status-publish","format-standard","hentry","category-c","category-private"],"jetpack_publicize_connections":[],"aioseo_notices":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p3OMEb-4P","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/oldblog.kusumotolab.com\/index.php?rest_route=\/wp\/v2\/posts\/299","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/oldblog.kusumotolab.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/oldblog.kusumotolab.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/oldblog.kusumotolab.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/oldblog.kusumotolab.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=299"}],"version-history":[{"count":2,"href":"https:\/\/oldblog.kusumotolab.com\/index.php?rest_route=\/wp\/v2\/posts\/299\/revisions"}],"predecessor-version":[{"id":301,"href":"https:\/\/oldblog.kusumotolab.com\/index.php?rest_route=\/wp\/v2\/posts\/299\/revisions\/301"}],"wp:attachment":[{"href":"https:\/\/oldblog.kusumotolab.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=299"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/oldblog.kusumotolab.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=299"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/oldblog.kusumotolab.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=299"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}