initial import
[staff/goc4/2018bti7061.git] / c-4-pointers / examples / c-pointers / pointers5.c
1 #include <stdio.h>
2
3 void multiply(int* pi1,int* pi2);
4 int main(){
5 int i1;
6 int i2;
7 puts("Enter two numbers");
8 scanf(" %d %d",&i1,&i2);
9 multiply(&i1, &i2);
10 printf("i1=%d and i2=%d \n",i1, i2);
11 }
12 void multiply(int* pi1,int* pi2){
13 *pi1 *= *pi2;
14 }
15 /* Output:
16 Enter two numbers
17 45 65
18 i1=2925 and i2=65
19 */
20