0% found this document useful (0 votes)
3 views4 pages

Java Week4 Turn1

The document outlines programming tasks for a student named Vedant Ajay Deshmukh, including reversing the digits of a number using a while loop, evaluating an investment equation with varying principal amounts, interest rates, and time periods, and generating specific outputs using for loops. Each task requires the student to write corresponding code and produce outputs. The document serves as an assignment or project guideline for programming practice.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views4 pages

Java Week4 Turn1

The document outlines programming tasks for a student named Vedant Ajay Deshmukh, including reversing the digits of a number using a while loop, evaluating an investment equation with varying principal amounts, interest rates, and time periods, and generating specific outputs using for loops. Each task requires the student to write corresponding code and produce outputs. The document serves as an assignment or project guideline for programming practice.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Name:Vedant Ajay Deshmukh

UID:2025300051

1)Problem 1: Given a number, write a program using while loop to reverse the digits of the
number. For example, the number 12345 should be written as 54321.
Code:

Output:
2)Write a program to evaluate the following investment equation
V = P(1+r)n and print the tables which would give the value of V for various combinations of the
following values of P, r and n.
P: 1000, 2000, 3000,..... 10,000
r: 0.10, 0.11, 0.12,....., 0.20
n: 1, 2, 3,... 10
(Hint: P is the principal amount and V is the value of money at the end of n years. This equation
can be recursively written as V= P(1+r) P=V That is, the value of money at the end of first year
becomes the principal amount for the next year and so on).
Code:
Output:
3)Write a program to print the following output using for loops.

Code:

Output:

You might also like