Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- * File: main.c
- * Author: Radim
- *
- * Created on Pondelok, 2010, november 8, 15:34
- */
- #include <stdio.h>
- #include <stdlib.h>
- /*
- *
- */
- int main(int argc, char** argv) {
- int n;
- printf("Zadejte pocet promennych:\n");
- if ((scanf("%d", &n) != 1) || (n < 2) || (n > 20)) {
- printf("Nespravny vstup.\n");
- return 1;
- }
- printf("Zadejte %d prvku matice:\n", n * (n + 1));
- double matice[20][21];
- int i, j;
- for (i = 0; i < n; i++)
- {
- for (j = 0; j < n + 1; j++)
- {
- if (scanf("%lf", &matice[i][j]) != 1)
- {
- printf("Nespravny vstup.\n");
- return 1;
- }
- }
- }
- return (EXIT_SUCCESS);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement