#include <stdio.h>
#define MaxA 2
#define MaxB 3
int main( void ) {
int matriza[ MaxA] , matrizb[ MaxB] , matrizc[ MaxA + MaxB] , indice;
for ( indice = 0 ; indice < MaxA; indice++ ) {
printf ( "\n digite o valor da matriz A: " ) ; scanf ( "%d" , & matriza
[ indice
] ) ; matrizc[ indice] = matriza[ indice] ;
}
for ( indice = 0 ; indice < MaxB; indice++ ) {
printf ( "\n digite o valor da matriz B: " ) ; scanf ( "%d" , & matrizb
[ indice
] ) ; matrizc[ indice + MaxA] = matrizb[ indice] ;
}
for ( indice = 0 ; indice < MaxA + MaxB; indice++ )
printf ( "\n Os valores das matrizes A e B sao: %d \n " , matrizc
[ indice
] ) ; return 0 ;
}
I2luY2x1ZGUgPHN0ZGlvLmg+CgojZGVmaW5lIE1heEEgMgojZGVmaW5lIE1heEIgMwoKaW50IG1haW4odm9pZCkgewoJaW50IG1hdHJpemFbTWF4QV0sIG1hdHJpemJbTWF4Ql0sIG1hdHJpemNbTWF4QSArIE1heEJdLCBpbmRpY2U7CgkKCWZvcihpbmRpY2UgPSAwOyBpbmRpY2UgPCBNYXhBOyBpbmRpY2UrKykgewogICAgICAgIHByaW50ZigiXG4gZGlnaXRlIG8gdmFsb3IgZGEgbWF0cml6IEE6ICIpOwogICAgICAgIHNjYW5mKCIlZCIsICZtYXRyaXphW2luZGljZV0pOwogICAgICAgIG1hdHJpemNbaW5kaWNlXSA9IG1hdHJpemFbaW5kaWNlXTsKICAgIH0KCQoJZm9yKGluZGljZSA9IDA7IGluZGljZSA8IE1heEI7IGluZGljZSsrKSB7CiAgICAgICAgcHJpbnRmKCJcbiBkaWdpdGUgbyB2YWxvciBkYSBtYXRyaXogQjogIik7CiAgICAgICAgc2NhbmYoIiVkIiwgJm1hdHJpemJbaW5kaWNlXSk7CiAgICAgICAgbWF0cml6Y1tpbmRpY2UgKyBNYXhBXSA9IG1hdHJpemJbaW5kaWNlXTsKICAgIH0KCQoJZm9yKGluZGljZSA9IDA7IGluZGljZSA8IE1heEEgKyBNYXhCOyBpbmRpY2UrKykgICAgICAKICAgICAgICBwcmludGYoIlxuIE9zIHZhbG9yZXMgZGFzIG1hdHJpemVzIEEgZSBCIHNhbzogJWQgXG4iLCBtYXRyaXpjW2luZGljZV0pOwoJcmV0dXJuIDA7Cn0K