Assignment Day-3

1.       Write a program to find GCD of two integer variables.






2.        Write a program to check whether a number is positive, negative or zero using switch case.




3.        Write a program to count number of digits in a given integer.




4.     Write a program to evaluate the following expressions

(i)                   4x2 + 2x + 10

(ii)                5x3 + 4x2 y2  + 4y3 +30

              Here x and y may be integer/float quantity have to be taken from the keyboard. 




5.      Write a program to find the sum of individual digits of a positive integer. The number has to be taken  as input from the keyboard. The total number of digits in the number may be four.







Write a program to compute the average of the ten numbers 1, 4, 9, ..., 81,
100, that is, the average of the squares of the numbers from 1 to 10.




Comments

Popular Posts