
C programlama dilini oğrenmeye yeni başladım. Teslim tarihi 08.04.2017 21:00 olan odevimin bir kısmını yapabildim ama program doğru calışmıyor.
Odev sorusunu spoiler icinde veriyorum. Buna benzer soruların sorulduğunu gordum ama hicbirinde cevap yoktu.
Alıntı:
Write a MAIN function and two FUNCTIONS to compute and print the
prime elements of a two-dimensional 30X25 integer array A.
Within the MAIN function:
. Declare a two-dimensional 30X25 integer array A and initialize
it with random numbers between 100 and 200 inclusive.
. Declare also a one-dimensinal integer array B with a reasonable
size to hold the prime elements of the array A.
. Print the array A.
. Pass the arrays A and B to the FUNCTION1 as arguments and get
the return value(the size of B, the number of prime elements
of A stored in B) from the FUNCTION1.
. Pass the array B and the size of B(returned value from the
FUNCTION1) to the FUNCTION2 as arguments.
. Print the array B.
. Print the array B without duplicates (i.e., repeated elements
will be written only once.
Within the FUNCTION1:
. Read array A elements and compute and store the prime elements
of A into the array B.
(An integer n>=2 is said to be prime
if and only if no integer k, 2