Javatpoint Logo

Given n as input, for every number from 1 to n

By: kavish*** On: Fri Feb 16 19:04:17 IST 2018     Question Reputation0 Answer Reputation0 Quiz Belt Series Points0  0Blank User
Given n as input, for every number from 1 to n( take n=5)
print C if the number is divisible by 3
print B if the number(on division with 3) leaves remainder 2
print A if the number(on division with 3) leaves remainder 1
Please write the program for the expected output
output is ABCAB
Up0Down
core java  x  328Tags