Looping Looped My Head ;)


Hat friends,

I felt, I’m very bad in looping in programming. So my brother, arulalan gave some simple programs as a task, which using loop. The tasks are,

Hai suresh.
Try to solve the following challenges in loop.
These and all simple problems to you.
while solving these problem, u may understand the clear concepts of loop.
If u cant understand any of the question, pl ask me over phone.
ok. Do well. reply with ur coding…
wishes..

Looping :

Day 1: – Level : Beginners
Q1.
a. Print the nos from 1 to 1000 in new lines
b. Print the nos from 1 to 1000 using ‘tab’ or/and ‘single’ spaces.
c. Print the nos from 1 to 50 wihtout any spaces,tab,new line.
i.w like 1234….484950
Q2.
a. Print the alphabets from A to Z and a to z
b. Get any name from user and store it in array variable. Print each
character from that name using loop.
c. Get 2 names from the user and split those 2 strings into an individual chars and print it like
combination of both names. eg  : 1.Arul 2.Suresh outputs: ASruulesh & SAurruelsh
Q3.
a. Print from 1 to nos for 5 times using two loops (inner looping)
Q4.
a. Print ‘Hello World’ for infinite times using while loop.
Q5.
a. Get a maximum no from user and print the sum of the digits value of the given no.
eg: 123, 1+2+3 = 6 ( use any loop)
Q6.
a. Get the input from the user and print it, immediately untill user will be give the input as “end”.
use while loop for this.
Q7.
a.  Print 3X3 matrix using two for loops like,
1     2      3
4     5      6
7     8      9
Q8.
a. Print 9X9
Q9. Get two 3X3 matri from user and print the added matix.
Q10. Get the two 3X3 matrix from user and subtract it from one another and print the resultant matrix.
Day 2: [level : Beginners Stage 2 ]
======================================
Q1. Get the 3X3 matrix input from user and print the square and cube of it using for loops
Q2. Get the two matrix (3X3) input from the user and find out the multiplication of it.
Q3. Get an integer from user. Print the #X3 matrix upto that much times (user input), using combination of 2 for loops and 1 outer while loop.
Q4. Find out the Fibonacci Serious
================

Regards,
Arulalan.T

Kanchi Linux User Group Rocks !
http://kanchilug.wordpress.com

My Experiments In Linux are here
http://tuxcoder.wordpress.com

Last night sanmugam anna taught basic looping over phone. we spoked more than 3hours. he explained all things very gently. Thanks to snamugam anna.

I got confident and some clear view of looping in programming. 🙂  

Now, i looped the looping.  😉

Advertisements

One thought on “Looping Looped My Head ;)

  1. Pingback: My Looping codes in “Ruby” | my linux world

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s