Computer Science, asked by rajendradas873, 7 months ago

c) Write a program in C to print the numbers from 4 to 9 and their

squares.​

Answers

Answered by rohitkhajuria90
23

Please refer the attached image

Attachments:
Answered by sarahssynergy
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