sfolax6776

2 days agoA. Introduction A valid credit card number will yield a result divisible by 10 when you:
Form the sum of all digits. Add to that sum every second digit, starting with the second digit from the right. Then add the number of digits in the second step that are greater than four. The result should be divisible by 10.
For example, consider the number 4 0 1 2 8 8 8 8 8 8 8 8 1 8 8 1. The sum of all digits is 89. The sum of the bold digits is 46. There are five bold digits larger than four, so the result is 89+46+5=140. 140 is divisible by 10 so the card number is valid. B. Write your code to check if a credit card number is valid or not according to the rules above. You need to verify if the input is a 12-digit number.

R2a

0 10

1 9

2 8

3 7

4 6

R2b

10

12

14

16

18

20

22

24

26

28

30...

R1a

*

**

***

****

R1b

=====

*

====

**

===

***

==

****

=

R1c

*****

*****

*****

*****...

R22a 10

R22b 1.78333333...

R22c 2

R22d 0

R6.2 a. 0 10 1 9 2 8 3 7 4 6 b. 01011121231341451561671781891910201121...

R6.19

https://repl.it/@DaveyYu/Homework-for-October-31-3-or-October-28don't know if it works or nR6.1

a.

*

**

***

****

b.

=====

*====

**===

***==

****=

c.

*****

R6.22

a. 10

b.6

c.error

d.error

r6.2

a. 0 10

1 9

2 8

3 7

4 6

r6.2 b.

010

19

28

37

46

r6.19

int n = in.nextInt();

double x=0;

double s=1.0;

while(s > 0.01)

{s=1.0/(1+n*n);

n++;

x=x+s;

}

r6.1

a.

*

**

***

****

b.

=====

*====

**===

***==

****=

c.

*****

=====

*****

=====

*****

=====

*****

=====

*****

=====

r6.22

a.10

b.0.27916666666

c. 2

d. 2

R6.2 a. 0 10 b. 10,12,14,16,18,20...

1 9

2 8

3 7

4 6

R.6.1 a.

*

**

***

****

b.

=====

*

====

**

===

***

==

****

=

c.

*****

*****

*****

*****

*****

...

R6.22

a. 10

b.1.925

c.error

d.error

R5.6

a. 0 10 b. 0 10 etc.

1 9

2 8

3 7

4 6

R5.19

https://repl.it/@Brainseater905/TransparentSeagreenBundledsoftwareWarning: Do not press RUN. If you do, your computer is likely to crash.R5.1

a. **********

b.====

*====

**====

***====

****====

c. stars

stripes

stars

stripes

stars

stripes

stars

stripes

stars

stripes

stars

stripes

(Crashes Computer)

R5.22

a.10

b.6

c and d. error

@danny481 and @ trjoshi3011 answers are correct. Meanwhile refer below resources. It might help.

While loop.Do-while loop.