function [ ] = leapyears(startyear,endyear) arrayYears = [startyear:endyear] checkYears = rem(arrayYears,4)
After this is run it gives me an array. I want to fprintf the inputs that give me 0. how would I go about doing that?

 Akzeptierte Antwort

Guillaume
Guillaume am 21 Feb. 2018

0 Stimmen

fprintf('%d\n', arrayYears(checkYears == 0))

Weitere Antworten (0)

Kategorien

Mehr zu Mathematics finden Sie in Hilfe-Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by