













































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!














































5
3. An algorithm is a formula or set of steps for solving a particular problem;
5. Pseudo-code: An outline of a program or algorithm, written in a form that can easily be converted into real programming statements; 1. Example : The pseudo-code to add two numbers might be written: Start Input number1, number Sum = number1 + number Display heading message “Number1, Number2, Sum” Display number1, number2, Sum End 2. Can not be compiled nor executed, and there are no real formatting or syntax rules. 6. Caution: Never write your program before either Algorithming, flowcharting or pseudo-coding it. 7
Develop a C program to Compute the Volume and Dimensional weight of a box?
1. Analysis:
3) Processing:
/* A C program to compute the Volume & Dimensional weight Dimensional weight of a box */ _/ STEP 1: START PART /_
_/ STEP 2: Reading Data/_**
10
*/ * STEP 3: Computation */*
_/ step 4 OUTPUT/_**
_/ STEP 5 END/_**
Benefits of learning C
C History
‘Hello World’ in C #include <stdio.h> main() { printf(“Hello, world!\n”); return 0; } #include C preprocessor command that lets user includes the code from another file (such as a library) stdio.h standard input/output library #include <stdio.h> allows you to use code from the standard input/output library that contains printf function
General C program! # directives main() { statements }
Some definitions