0 ratings0% found this document useful (0 votes) 20 views4 pagesLab Cpy
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here.
Available Formats
Download as PDF or read online on Scribd
wee X ‘asigment 1c X sume digo aemante X asgnet 2c
#include
I main()
Fit
| r, c, b[20][20],m=0;
printf ( di
sca 1 62,60);
print£( di
( k= 0; k < rj ++k)
(int p = 0; p< cr +#p) {
scanf( , &b[k] [p])¢
r }
print£( di
k= 07 k < xp +4k){
i p< oc; tp) {
print£ ( » bk] (pl);
print£("\n") ;
|) print£( om);
}
Deen A et) ie aS
Enter the number of rows and columns: 3 3
Enter elements of 1st matrix:
25 14 52 65 84 75 14 25
entered matrix is:
25 14
[oloMm 1a)
14° 25
The sum of the diagonal elements: 102
Process returned 0 (0x0) executi
23.180 s
Press any key to continue.nl
fortint 1
for(int
iE (
for(int
print
for(int
ile
1 (@e-tesr
Palate aetna mC)
Cee
rR susA
BH
AB
finclude
finclude
Ant main()
ql
int d=4;
for (int r=1;1<=20; r++) {
int t = (int) ceil ( (double) r/ (double) d) ;
for (int h=1;h<=20;h+) (
int p = (int) ceil ( (double) h/ (double) 4) ;
BE((t == 2) | tA) 8 (p—=3] |pH=2| IPA)
printt(" ");
jeise;
printe("**);
)
:
for(int s-1;5<-3;51+) (
printé(" ");
b
for(int h=1;h<-20;h++) (
int p = (Amt) ceil ( (double) h/ (double) d) ;
5) 46 (p ==2| Ip ==31 |p
printe("*");
for(int s-i;s<
printe(" ");
att) |
}
for(int n=1;h<=20;n+4) (
Ant p — (int) ceil( (double) h/ (double) a) ;
4f((e == 1 fe
printe("
jelse(
prints ("*
lip
}
)
for(int s-1;8<-3;8+4) {
printe(" "
d
for(int,
ant p
mhe=20;h4+) (
(int) ceil ( (double) n/ (double) a) ;
peinte("
jelse(
printe("*
)
}
for(int s=
printf
ps<=3;5++) {
)
for (int h=1;h<=20;h++) {
int p = (int) ceil (double) h/ (double) d) ;
5) £8 (
printf ("\n");