High level languages
High level languages were developed for make programming easier.Tgese languages are called higher level languages.Because there syntax is more like human language than assembly or machine language code.Higher level programming languages use familiar words rather than make up machine instructions.To express computer operations.These languages use operators such as the + and - sign that are the familiar components of mathematics.As a result people can read,Write and understand computer programmes much more easily when using a high level language.Still the instructions must be translated inyo machine language before the computer can understand and carry them out.
Calculate percentage #include < stdio.h > void main() { int s1, s2, s3, s4, s5, sum, total = 500; float per; printf("\nEnter marks of 5 subjects : "); scanf("%d %d %d %d %d", &s1, &s2, &s3, &s4, &s5); sum = s1 + s2 + s3 + s4 + s5; printf("\nSum : %d", sum); per = (sum * 100)/500; /* percentage formula*/ printf("\nPercentage : %f", per); }
Comments
Post a Comment