原发布者:pkwhg520
如何编写一个简单的程序这里为大家介绍一下如何开始编写一个真正的但是简单程序。程序的概念:下面一段,关于程序的概念,内容来自维基百科:先阅读一段英文的:computerprogramandsourcecode,看不懂不要紧,可以跳过去,直接看下一条。Acomputerprogram,orjustaprogram,isasequenceofinstructions,writtentoperformaspecifiedtaskwithacomputer.[1]Acomputerrequiresprogramstofunction,typicallyexecutingtheprogram'sinstructionsinacentralprocessor.[2]Theprogramhasanexecutableformthatthecomputercanusedirectlytoexecutetheinstructions.Thesameprograminitshuman-readablesourcecodeform,fromwhichexecutableprogramsarederived(e.g.,compiled),enablesaprogrammertostudyanddevelopitsalgorithms.Acollectionofcomputerprogramsandrelateddataisreferredtoasthesoftware.Computersourcecodeistypicallywrittenbycomputerprogrammers.[3]Sourcecodeiswritteninaprogramminglanguagethatusuallyfollowsoneoftwomainparadigms:imperativeordeclarativeprogramming.Sourcecodemaybeconvertedintoanexecutablefile(sometimescalledanexecutableprogramorabinary)byacompilerandlaterexecutedbyacentralprocessingunit.