Convert Pence Sterling to Pound Sterling in C# – C# Programming Example
Basic C# Console

Convert Pence Sterling to Pound Sterling in C#

Write a program to convert currencies between British currency of pounds and pence, in which 1 pound contains 100 pence.

Write a statement that prints the value of price in the form “X pounds and Y pence” on a line by itself.

So, if the value of price was 2345, your code would print “23 pounds and 45 pence”.

If the value was 501 it would print “5 pounds and 1 pence ”.

If the value was 99 your code would print “0 dollars and 99 cents”.

Source Code:

Output:

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: