printf ("12345 1234 123 12 1\n"); ... or, did you mean to do it with loops ? ... int i, j; for (i=5; i>0; i--) { for (j=1; j<=i; j++) printf ("%d", j); printf (" "); } printf ("\n");
12
#include<stdio.h> #include<conio.h> void main() { int i,a[3][3]={1,2,3,4,5,6,7,8,9},j,s=0,m,n; clrscr(); /*for(i=0;i<3;i++) { for(j=0;j<3;j++) { printf("\na[%d][%d]= ",i,j); scanf("%d",&a[i][j]); } }*/ for(i=0;i<3;i++) { for(j=0;j<3;j++) { printf("%d",a[i][j]); } printf("\n\n"); } for(i=0;i<3;i++) { for(j=0;j<3;j++) s=s+a[i][j]; printf("\n Sum of %d`th row=%d",i+1,s); s=0; } { int i,j,s=0; for(j=0;j<3;j++) { for(i=0;i<3;i++) s=s+a[i][j]; printf("\n\t\t Sum of %d`th column=%d",j+1,s); s=0 ; } } getch(); }
He is 4/3 of David's age. The original version of this question has a sum of their ages, which would allow you to get a numerical answer. (e.g. sum of 56, ages are 32 and 24). If James is 8, David is 6 - when James was 6, David was 4 If James is 12, David is 9 - when James was 9, David was 6 J = 2 [ D - (J-D)] J = 2 (2D-J) J = 4D - 2J 3J = 4D J = 4/3 D
#include<stdio.h> #include<conio.h> main() { int a[4][4],b[4][4],c[4][4],i,j; printf("enter the elements of matrix a"); for(i=0;i<=3;i++) for(j=0;j<=3;j++) scanf("%d",&a[i][j]); printf("the first matris is"); for(i=0;i<=3;i++) { printf("\n"); for(j=0;j<=3;j++) printf("%d",a[i][j]); } printf("Enter the elements of second matrix"); for(i=0;i<=3;i++) for(j=0;j<=3;j++) scanf("%d",&b[i][j]); printf("the second matrix is"); for(i=0;i<=3;i++) { printf("\n"); for(j=0;j<=3;j++) printf("%d",b[i][j]); } for(i=0;i<=4;i++) for(j=0;j<=4;j++) c[i][j]=a[i][j] + b[i][j]; printf("the addition of matrix is"); for(i=0;i<=3;i++) { for(j=0;j<=3;j++) printf("%d\t",c[i][j]); printf("\n"); } getch(); }
D. J. Houlton was born on August 12, 1979.
D. J. Houlton was born on August 12, 1979.
D. J. Campbell was born on November 12, 1981.
D. J. Campbell was born on November 12, 1981.
J. D. Hayworth was born on July 12, 1958.
J. D. Hayworth was born on July 12, 1958.
D. J. Carrasco was born on 1977-04-12.
J. D. Beach was born on 1991-10-12.
D. J. Mbenga was born on 1980-12-30.
J. D. Smart was born on 1973-11-12.
J. D. Walsh was born on 1974-12-24.
D. J. Trahan was born on 1980-12-18.