Vector of numbers divisible by 3 - MATLAB Cody - MATLAB Central

Problem 1548. Vector of numbers divisible by 3

Difficulty:Rate
  • Input(n) - any integer
  • Output(v) - vector with numbers divisible by 3(exept 0) starting from n to 0

Examples:

  • n=6; v=[6 3]
  • n=-16; v=[-15 -12 -9 -6 -3]

Solution Stats

40.7% Correct | 59.3% Incorrect
Last Solution submitted on Aug 21, 2025

Solution Comments

Show comments
Join Cody Contest 2025 — Have Fun and Win Prizes!
...
We’re excited to invite you to Cody Contest 2025! 🎉 Pick a team,...
Dive Into Hands-On Learning at MATLAB EXPO 2025 – Register Now!
Get ready to roll up your sleeves at MATLAB EXPO 2025 –...
0

Problem Recent Solvers149

Suggested Problems

More from this Author9

Problem Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!