CSE106 - Fundamentals of Web Design

Assignment 4

Details of the Student:

  1. Name: Thashan Anil Dasashish
  2. Enrollment ID: SAU/FET/BTECH(CSE)/2025/213
  3. Section: D
  4. Branch: B. Tech. CSE - Semester 2
  5. Email: thashan.dasashish2025@students.sau.ac.in

Index


Question 3:

Mirror Corridor

Given integers N and K, find the smallest non-negative integer X such that: Input Format: Take N and K using prompt().
Output Format: Print X using alert().
Constraints: 1 ≤ N ≤ 10^6, 2 ≤ K ≤ 9


Solution:

Press the button to execute JS solution of the question.