Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- int main()
- {
- int broj;
- scanf("%d ", &broj);
- int n, m, i, j;
- scanf("%d%d", &n, &m);
- int matrica[n][m];
- for(i = 0; i < n; i++){
- for(j = 0; j < m; j++){
- scanf("%d ", &matrica[i][j]);
- }
- }
- for(i = 0; i < n; i++){
- int zbir = 0;
- for(j = 0; j < m; j++){
- zbir += matrica[i][j];
- }
- if(zbir < broj){
- for(j = 0; j < m; j++){
- printf("-1 ");
- }
- }
- else if(zbir > broj){
- for(j = 0; j < m; j++){
- printf("1 ");
- }
- }
- else{
- for(j = 0; j < m; j++){
- printf("0 ");
- }
- }
- printf("\n");
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement