structured programming cat
structured programming cat
#include<stdio.h>
#include<conio.h>
Void main ()
Return;
Comments: these are ways of explaining what makes a program. They are ignored by the
compiler. Comments can be used anywhere in the program.
Main (): this function show where the program execution begins.
Printf (): it is a pre-defined function used to display the text on the screen.
b) Write a program in c to find the greatest of the three different numbers using
conditional operator
#include<stdio.h>
Void main ()
{
Int x, y, z;
c) Using array structure, writes a program that accepts 5 values from the user, calculate
sum and average of these values and print them.
#include<stdio.h>
Include main () {
Float average=0.0
Sum=sum+arr [I]
Age= (float)/n;
Return 0;
* *
* * *
* * * *
Int main ()
Int I, j, rows;
Printf (“\n”);
Return 0