Computer Science, asked by abhinashgupta3039, 5 months ago

Create a Java script program to accept the integer and display the result by multiplying it with 3

Answers

Answered by Anonymous
1

Answer:

The general logics for the questions are as follows:

Question 1: To accept integer and display the result by multiplying it with 3.

Multiply()

{ scanf("%d", &n);

result= n*3;

printf("%d", result);

}

Question 2: To accept two integers and display larger number of them.

larger()

{ scanf("%d %d", a,b);

if (a>b)

printf("a is greater");

else

printf("b is greater");

}

Question 3: To check whether, user entered number is positive or negative.​

positive()

{ scanf("%d", n);

if (n>0)

printf("The no. is positive");

else

printf("The no. is negative");

}

Explanation:

Similar questions