Commit 98f4f828 by olpool

täiesti uus fail

parent 520db76f
Showing with 38 additions and 0 deletions
#include<stdio.h>
#include<math.h>
int arvudesumma( int, int);
void vahetaArvuJarg(int*, int*);
int main()
{
int summa, a , b;
printf("sisesta arv \n");
scanf("%d", &a);
printf("sisesta arv \n");
scanf("%d", &b);
summa = arvudesumma(a, b);
printf("kahe arvu summa on %d \n", summa);
vahetaArvuJarg(a, b);
printf(" vahetatud arvud %d ja %d ", a , b);
return 0;
}
int arvudesumma( a, b)
{
int s;
s = a + b;
return(s);
}
void vahetaArvuJarg( int *a, int *b)
{
int temp;
temp = *a;
*a = *b;
*b = temp;
}
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