Question: Need some help with this programming Question Please screenshot you output and Bold your coding. thanks Programming challenge Description: Given Positive integers A, B, and

Need some help with this programming Question

Please screenshot you output and Bold your coding. thanks

Programming challenge Description:

Given Positive integers A, B, and N write a program that prints integers from 1 to N. But for integers that are multiples of A print F, and for multiples of B print B. For integers which are multiples of both A and B, print FB.

input :

Your program should read lines of text from standard input. Each line will contain A, B, and N as space- delimited positive integers,

Test1 input

3 5 10

Output

For each line of input, print to standard output a line of space- delimited integers 1 through N, replacing integers as described above.

Expected output

1 2 F 4 B F 7 8 F B

Here are given code you need to accomplish:

process.stdin.resume();

process.stdin.setEncoding (utf8);

var stdin = ;

process.stdin.on (data, function (chunk) {

stdin += chunk;

}).on (end , function() {

var lines = stdin.trim().split( );

for (var i=0; i

process.stdout.write (write(lines[i]);

}

});

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!