practice

1
PRACTICE QUESTIONS 1. C++/ Write a program to check whether any number you have entered is a palindrome or not. Palindrome is a word or a number which looks the same no matter you are looking at it forwards or backwards. e.g., “radar” is a palindrome. 252 is also one. 211 & “hello” are not. 2. Write a MATLAB code which uses for loops and if conditions. Simply type an array and inside the for loop check whether each number is even or not. 3. Write a MATLAB code in which a logarithmic plot e -x is being shown. See log, semilogx, semilogy etc. 4. Try to make a sphere other than the sphere function in MATLAB. Use surf or mesh

Upload: sh-fahad-fiaz

Post on 06-Nov-2015

212 views

Category:

Documents


0 download

DESCRIPTION

practice quiz

TRANSCRIPT

Practice Questions1. C++/ Write a program to check whether any number you have entered is a palindrome or not.Palindrome is a word or a number which looks the same no matter you are looking at it forwards or backwards.e.g., radar is a palindrome. 252 is also one. 211 & hello are not.

2. Write a MATLAB code which uses for loops and if conditions. Simply type an array and inside the for loop check whether each number is even or not.

3. Write a MATLAB code in which a logarithmic plot e-x is being shown.See log, semilogx, semilogy etc.

4. Try to make a sphere other than the sphere function in MATLAB. Use surf or mesh