Index of the first number divisible by 3
18 ビュー (過去 30 日間)
古いコメントを表示
How do I answer this using for loop, any hint or answer?
Write a script that given a vector, called A, of n numbers, outputs the index of the first number divisible by 3.
Sample Output: Given A = [5, 4, 6, 7, 3]
the answer should read as follow:
The index first number divisible by 3 is: 3
0 件のコメント
回答 (1 件)
参考
カテゴリ
Help Center および File Exchange で Loops and Conditional Statements についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!