Commit 9a95ac85 by rallui

Upload New File

parent 48fb6206
Showing with 47 additions and 0 deletions
#include <stdio.h>
#include <stdio.h>
#include <stdlib.h>
int main()
{
int ReaPikkus = 50;
int VeeruPikkus = 50;
int MinPikkus = 2;
int A[ReaPikkus][VeeruPikkus];
int idx_rida;
int idx_veerg;
int summa;
int arv = 50;
do
{
printf("Sisesta veergude arv: ");
scanf("%d", &VeeruPikkus);
}
while(VeeruPikkus < MinPikkus);
do
{
printf("Sisesta ridade arv: ");
scanf("%d", &ReaPikkus);
}
while(ReaPikkus < MinPikkus);
for(idx_rida = 0; idx_rida < ReaPikkus; idx_veerg++)
{
for(idx_veerg = 0; idx_veerg < VeeruPikkus; idx_veerg++)
{
A[idx_rida][idx_veerg] = rand () % arv - ( arv/2 );
printf(" %d ", A[idx_rida][idx_veerg]);
}
printf("\n");
}
for(idx_veerg = 0; idx_veerg < VeeruPikkus; idx_rida++)
{
for(idx_rida = 0; idx_rida < ReaPikkus; idx_rida++)
}
return 0;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment