Use Fprintf or disp or which function to print pyramid
Show older comments
Dear MATLAB TEAM I have questions regarding some printing issues 1- i got a request to print the following triangle A1 as top of the triangle A1A2 A1A2A3 A1A2A3A4 . . A1A2A3A4A5A6A7A8A9A10 as a base --------------------------- 2- i couldn't solve this issue: A twin primes is a pair of prime numbers such that the difference between them is 2 (for example, 17 and 19). Write a computer program that finds all the twin primes between 10 and 500. The program displays the results in a two-column matrix in which each row is a twin prime. “You are allowed to use primes MATLAB command to generate the prime’s numbers “. -----------------------------------
Answers (1)
Walter Roberson
on 28 Apr 2016
0 votes
Use fprintf() to print the triangle.
You did not ask any question about the twin primes.
1 Comment
Eid Hajahjeh
on 28 Apr 2016
Edited: Eid Hajahjeh
on 28 Apr 2016
Categories
Find more on Classical Control Design in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!