Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- int main()
- {
- int a[3][3],red,kol,edolno;
- printf("Elementite na kvadratnata matrica 3x3 se: \n");
- for(red=0;red<3;red++)
- {
- for(kol=0;kol<3;kol++)
- {
- scanf("%d",&a[red][kol]);
- }
- }
- edolno=1;
- for(red=0;red<3;red++)
- {
- for(kol=0;kol<3;kol++)
- {
- if(kol>red && a[red][kol]!=0)
- {
- edolno=0;
- }
- }
- }
- if(edolno==1)
- {
- printf("\nMatricata e dolno triagolna\n");
- for(red=0;red<3;red++)
- {
- for(kol=0;kol<3;kol++)
- {
- printf("%d",a[red][kol]);
- }
- printf("\n\n");
- }
- }
- else
- {
- printf("\nMatricata ne e dolno triagolna\n");
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement