c) Write a program in C to print the numbers from 4 to 9 and their
squares.
Answers
Answered by
23
Please refer the attached image
Attachments:
Answered by
8
Program in C to print the numbers from 4 to 9 and their squares:
Explanation:
- #include<stdio.h>
- int square(int);
- int main(void)
- {
- register int a=0;
- for(a=2; a<10; a=(a+1))
- {
- printf(“The square of %d is: %d\n”, a, square( a ) );
- }
- return(0);
- } /* end main */
- int square(int param)
- {
- return( param * param ):
- }
Similar questions