while (code != right)

     {

         debug;

         try again;

     }

 

 

                                          CodeClub,SMVDU

Previous H/W questions

Write a program to take an input from user and find is it

  1. divisible by 3
  2. not divisible by 3
  3. divisible by both 3 and 6

write a program to  take  an input from user and print its factorial?

Write a program to take an input from the user and print its multiplication table?

sample Input:

3

Output format:

3*1=3

3*2=6

- - - - -

- - - - - -

3*20=60

Write a program to input a number n from user and print out result according to following rule:

  • 0 <= n <=10          print "Ben-ten"
  • n < 0                      print "less than zero"
  • n > 10                    print " greater than ten"

Take a number as input from user and print that number every time by deleting its last digit.

Sample input:

 356

Sample output:

 356

 35

 3

Take a number as input from user and print the last digit of that number.

Sample input:

 425

Sample output:

 5

Write a program to take a number n as input from user and then take n no's of integers from user again and count the number of even integers given by user.

Sample input:

 5

4 3 9 5 6

Sample output:

 2

Questions

1.Find the number of digits in an integer given by user.

2.Write a program to print all the digits in an integer taken input  from user.

sample input:

123

sample output:

3

2

1

   

 

3. Find the reverse of number

 

"While" Loop

By Sushil Khanchi

"While" Loop

  • 573