0% found this document useful (0 votes)
2 views17 pages

Variable Descriptions - Computer Project

Uploaded by

stumblemaster666
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views17 pages

Variable Descriptions - Computer Project

Uploaded by

stumblemaster666
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

Variable Descriptions (Table Format)

Below are separate variable-description tables for each program in your PDF.
Each table explains the purpose of every variable used in that specific code.

1. Prime
Variabl Typ
e e Description
n int Number to be
checked for
prime/composite/uniq
ue
c int Counts number of
factors of n
i int Loop variable for
checking divisibility

2. reverse
Variabl Typ
e e Description
n int Original number
Variabl Typ
e e Description
a int Stores last digit of n
b int Stores reversed
number

3. Prime_Pallindrome
Variabl Typ
e e Description
n int Input number
co int Counts factors of n
i int Loop variable for
factor checking
a int Copy of original
number
b int Reversed number
c int Last digit extracted
4. Twinprime_series
Variabl Typ
e e Description
n int Upper limit for series
i int Current number being
checked
j int Loop for factor count
of i
count int Number of factors of i
k int i + 2 (possible twin
prime pair)
l int Loop for factor count
of k
count1 int Number of factors of
k

5. Krishnamurthy
Variabl Typ
e e Description
n int Input number
Variabl Typ
e e Description
a int Extracted digit
b int Sum of factorials of
digits
c int Copy of original
number
d int Factorial value of a
digit
i int Loop for factorial
calculation

6. Series_Switch1
Variabl Typ
e e Description
n int Number of terms
ch int User choice for series
type
i int Loop counter
j int Denominator for
Variabl Typ
e e Description
series 1
d int Factorial value
k int Loop for factorial

7. Prime_sum
Variabl Typ
e e Description
n int Upper limit (100)
d int Sum of prime
numbers
i int Number being
checked
j int Loop for factor
checking
count int Counts factors
8. Odd_Even_Sum
Variabl Typ
e e Description
n int Upper limit
odd int Sum of odd
numbers
even int Sum of even
numbers
i int Loop counter

9. Discount1
Variabl
e Type Description
n int Original price
price doubl Discounted
e price
10. Series_Switch2
Variabl Typ
e e Description
n int Number of terms
ch int Choice of series
d int Denominator for
case 1
i int Loop counter
l int Power value in case
2
k int Factorial value
j int Loop for factorial
c cha Stores character ‘x’
r

11. Overloading_area
Variabl
e Type Description
r double Radius of circle
Variabl
e Type Description
s int Side of square
l int Length of
rectangle
b int Breadth of
rectangle
a int/ Area result
double
pi double Value of pi (3.14)

12. Min_Prime
Variabl Typ
e e Description
n int Input number
a int Extracted digit
c int Smallest prime digit
found
i int Loop for factor
checking
Variabl Typ
e e Description
count int Factor counter

13. Ascend_digit
Variabl Typ
e e Description
n int Input number
i int Digit from 0
to 9
d int Copy of
number
a int Extracted
digit

14. Eshop
Variabl
e Type Description
name String Item name
price double Original price
Variabl
e Type Description
amoun double Final amount after
t discount
sc Scann Takes user input
er
obj1 Eshop Object of class

15. Library_Fine
Variabl
e Type Description
n int Number of days
late
fine doubl Total fine
e amount

16. Electricity_Bill
Variabl
e Type Description
n int Units
Variabl
e Type Description
consumed
bill doubl Total bill
e amount

17. Duck_Class
Variabl
e Type Description
n int Input number
a int Extracted digit
count int Counts number
of digits
c int Copy of
number
b int Extracted digit
in second loop
l boolean Flag for duck
number
sc Scanner Input object
Variabl
e Type Description
obj1 Duck_Clas Object of class
s

18. Automorphic_No
Variabl Typ
e e Description
n int Input number
a int Extracted digit
count int Number of digits
c int Copy of n
e int Square of n
b int Reverse of n
g int Extracted digit from
square
h int Reverse of last digits
of square
19. Armstrong
Variabl
e Type Description
n int Input number
a int Extracted digit
cnt int Number of digits
c int Copy of number
e int Copy of original
number
b int Extracted digit
(second loop)
d double Sum of powered
digits
sc Scanner Input object
obj1 Armstro Object of class
ng
20. special
Variabl Typ
e e Description
n int Input number
a int Extracted digit
b int Sum of digits
c int Product of digits
d int Copy of original
number
find int Sum of sum and
product

21. Pronic
Variabl
e Type Description
n int Input number
flag boolea Indicates pronic or
n not
p int Stores i+1
Variabl
e Type Description
i int Loop variable

22. Smallest_digit
Variabl Typ
e e Description
n int Input number
a int Extracted digit
min int Smallest digit found
c int Copy of original
number

23. Compno_SmallDigit
Variabl Typ
e e Description
n int Input
number
ch int User choice
count int Factor
Variabl Typ
e e Description
counter
i int Loop
variable
min int Smallest
digit
a int Extracted
digit

24. Scanner_Palli
Variabl
e Type Description
n int Input number
a int Copy of
number
b int Reversed
number
c int Extracted digit
sc Scann Input object
Variabl
e Type Description
er

25. Overload
Variabl Typ
e e Description
i int Loop for rows
j int Loop for
columns
n int Input number
a int Extracted digit

If you want, I can also export this as a


Word/PDF file for submission.

You might also like