Close
Close

Table using for loop is not working correctly,it's not giving desirable output.

   jadli11

#include<stdio.h>
int main()

{
  int a;
  printf("enter the number for Table :");
  scanf("%d", &a);


  for(int i=1;i<=10;i++)
  {
    printf("%d*i= %d\n",a,a*i );
  }
  return 0;
}
 


Answers

  •   

    Use printf("\n%d*%d= %d",a,i,a*i );


    • i got it. Thanks bro
      - jadli11

Ask Yours
Post Yours
Write your answer