“tabel multiplikasi di c” Kode Jawaban

tabel multiplikasi menggunakan c

#include <stdio.h>

int main(){
	//declaring variables
    int n,i,a,start,end;
    //taking and printing the instructions
    printf("Enter first number from where you want to start multiplication : \n");
    scanf("%d",&start);
     printf("Enter Last number from where you want to end multiplication : \n");
    scanf("%d",&end);
  	//using loops

    for(n=start;n<=end;n++){
        a=0;
        for(i=1;i<=10;i++){
            a+=n; //setting the value of a. i used addition instead of multiplication
          //because computer takes too much time for multiplating numbers than doing addition
          
            printf("%d x %d = %d\n",n,i,a);

        }
        printf("Multiplication has ended of %d\n\n",n);
    }


    return 0;


}
rifatibn

C Program untuk Mencetak Tabel Perkalian

#include <stdio.h>
int main(){
    int a, b, c, e;
    printf("Enter table format: \n");
    scanf("%d", &a);
    printf("Enter end of table: \n");
    scanf("%d", &e);
    for(b = 0; b <= e; b++){
        printf("%d * % d = %d\n", b, a, a*b);
    }
}
VinCoD

tabel multiplikasi di c

#include <stdio.h>
int main()
{
    // declaring table
    int table[10][10];


    int sum = 0;
    // loop
    for(int i = 0; i < 10; i++){
        printf("%d table starting \n\n",i + 1);
        for(int j = 0; j < 10; j++){
             // using addition instead of multiply for better performance
            sum += (i + 1);
            //
            table[i][j] = sum;
            // printing table
            printf("%d x %d = %d \n",i + 1,j + 1,table[i][j]);
        }
        sum = 0;
        printf("\n");
    }

}
Numan from Bangladesh

Tabel multiplikasi di C menggunakan array

#include <stdio.h>

int main()
{
    int namta[11][10]; //programme will run upto 11 multiplication tables, each table has 10 columns
    int i,j;
    for(i = 1; i <= 11; i++)
    {
        for(j = 1; j <= 10; j++)
        {
            namta[i][j] = i * j;  //getting the multiplating value into the array
        }
    }

    for(i = 1; i <= 10; i++){
        for(j = 1; j <= 10; j++){
            printf("%d x %d = %d\n",i,j,namta[i][j]);  //printing the array of results calculated in the previous loops
        }
        printf("\n");
    }


    return 0;
}
rifatibn

Jawaban yang mirip dengan “tabel multiplikasi di c”

Pertanyaan yang mirip dengan “tabel multiplikasi di c”

Lebih banyak jawaban terkait untuk “tabel multiplikasi di c” di C

Jelajahi jawaban kode populer menurut bahasa

Jelajahi bahasa kode lainnya