Welcome to collectivesolver - Programming & Software Q&A with code examples. A website with trusted programming answers. All programs are tested and work.

Contact: aviboots(AT)netvision.net.il

Semrush - keyword research tool

Create your online store today with Shopify

Turn ChatGPT, Claude, Gemini, And CoPilot Into Your Personal Assistant, Business Coach, Content Creator, And More

AFFILIATE MARKETING Your all-in-one performance engine Manage affiliates, creators, and customer referrals in one unified platform—turning every partnership into measurable growth

Secure & Reliable Web Hosting, Free Domain, Free SSL, 1-Click WordPress Install, Expert 24/7 Support

Disclosure: My content contains affiliate links.

43,239 questions

56,142 answers

573 users

How to create a 10 X 10 division table in C

1 Answer

0 votes
#include <stdio.h>

int main(void) {
    int start = 1, end = 10;
 
    for (int i = start; i <= end; i++) 
        printf("      %d", i);
 
    printf("\n");
 
    for (int i = start; i <= end; i++) {
        printf("%d:  ", i);
        for (int j = start; j <= end; j++) {
            printf("%.2f   ", (float)i / (float)j);
        }
        printf("\n");
    }        
    
    return 0;
}



 
 
 
 
/*
run:
 
      1      2      3      4      5      6      7      8      9      10
1:  1.00   0.50   0.33   0.25   0.20   0.17   0.14   0.12   0.11   0.10   
2:  2.00   1.00   0.67   0.50   0.40   0.33   0.29   0.25   0.22   0.20   
3:  3.00   1.50   1.00   0.75   0.60   0.50   0.43   0.38   0.33   0.30   
4:  4.00   2.00   1.33   1.00   0.80   0.67   0.57   0.50   0.44   0.40   
5:  5.00   2.50   1.67   1.25   1.00   0.83   0.71   0.62   0.56   0.50   
6:  6.00   3.00   2.00   1.50   1.20   1.00   0.86   0.75   0.67   0.60   
7:  7.00   3.50   2.33   1.75   1.40   1.17   1.00   0.88   0.78   0.70   
8:  8.00   4.00   2.67   2.00   1.60   1.33   1.14   1.00   0.89   0.80   
9:  9.00   4.50   3.00   2.25   1.80   1.50   1.29   1.12   1.00   0.90   
10:  10.00   5.00   3.33   2.50   2.00   1.67   1.43   1.25   1.11   1.00 
 
*/

 



answered Jan 8, 2022 by avibootz
edited Jan 8, 2022 by avibootz
...