Wednesday, May 9, 2012

Expression Evaluation: Multiplication

Hello guys!!! How are you all ? Hope, all of you are well by the grace of Almighty. Today we learn how to multiply a number with another number. Let's look at a program:













Output: Product: 15


We can also write this code in the following way:












Output: Product 15

If we want to scan the two integer numbers, then the code is looked like the following:














Output will depend on input. If the two inputs are "5" & "3"  then output will be:

Enter Two Numbers: 5  3
Product: 15


If we the output more clear, then we can write code the following way:













If the inputs are "5" & "3", then the output will be:

Enter Two Numbers: 5 3
Product: 5 * 3 = 15

Thank you all..:)

0 comments:

Post a Comment