{"id":789,"date":"2017-08-13T15:43:28","date_gmt":"2017-08-13T15:43:28","guid":{"rendered":"http:\/\/people.utm.my\/kohmenghock\/?page_id=789"},"modified":"2017-08-13T15:47:23","modified_gmt":"2017-08-13T15:47:23","slug":"example-of-read-statement-from-users-input","status":"publish","type":"page","link":"https:\/\/people.utm.my\/kohmenghock\/codeblocks-simple-guide-requesting-input-from-user\/example-of-read-statement-from-users-input\/","title":{"rendered":"Example of read statement from user&#8217;s input"},"content":{"rendered":"<p>&nbsp;<\/p>\n<p>program read_statement<br \/>\nimplicit none<br \/>\nreal momentum, mass, velocity<\/p>\n<p>!&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br \/>\n! request for input values from user<br \/>\n!&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br \/>\nprint*, &#8220;Provide a value for mass (in units of kilogram)&#8221;<br \/>\nread*, mass<\/p>\n<p>print*<br \/>\nprint*, &#8220;What is the velocity of the object (in meter per second)?&#8221;<br \/>\nread*, velocity<\/p>\n<p>!&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br \/>\n! calculate linear momentum<br \/>\n!&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br \/>\nmomentum = mass * velocity<\/p>\n<p>print*,<br \/>\nprint 101, &#8220;The momentum of the object is&#8221;, momentum, &#8220;kg m\/s&#8221;<br \/>\n101 format(a,1x,f6.3,1x,a)<br \/>\nprint*<\/p>\n<p>end program<\/p>\n","protected":false},"excerpt":{"rendered":"<p>&nbsp; program read_statement implicit none real momentum, mass, velocity !&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212; ! request for input values from user !&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212; print*, &#8220;Provide a value for mass (in units of kilogram)&#8221; read*, mass print* print*, &#8220;What is the velocity of the object (in meter per second)?&#8221; read*, velocity !&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212; ! calculate linear momentum !&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212; momentum = mass * &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/people.utm.my\/kohmenghock\/codeblocks-simple-guide-requesting-input-from-user\/example-of-read-statement-from-users-input\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Example of read statement from user&#8217;s input&#8221;<\/span><\/a><\/p>\n","protected":false},"author":14180,"featured_media":0,"parent":781,"menu_order":0,"comment_status":"closed","ping_status":"open","template":"","meta":{"footnotes":""},"class_list":["post-789","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/people.utm.my\/kohmenghock\/wp-json\/wp\/v2\/pages\/789","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/people.utm.my\/kohmenghock\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/people.utm.my\/kohmenghock\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/people.utm.my\/kohmenghock\/wp-json\/wp\/v2\/users\/14180"}],"replies":[{"embeddable":true,"href":"https:\/\/people.utm.my\/kohmenghock\/wp-json\/wp\/v2\/comments?post=789"}],"version-history":[{"count":0,"href":"https:\/\/people.utm.my\/kohmenghock\/wp-json\/wp\/v2\/pages\/789\/revisions"}],"up":[{"embeddable":true,"href":"https:\/\/people.utm.my\/kohmenghock\/wp-json\/wp\/v2\/pages\/781"}],"wp:attachment":[{"href":"https:\/\/people.utm.my\/kohmenghock\/wp-json\/wp\/v2\/media?parent=789"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}