Fox & C

Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 4

ASSIGNMENT

If Statements 1. Find the greates number among three random numbers. 2. Input marks of three subjects of a student and print the message PASS if the student gets more then 40 in every subject. If the students gets less then 40 in any of the subject then print the message FAIL. 3. Find the greatest number among four random numbers.

Looping and Nested Looping 1. Input ten rendom number form user and print their sum. 2. Calculate factorial of a number 3. Print table of a given number. 4. Input 10 rendom numbers and find out the greatest, smallest, sum of all numebrs. And also count the odd numbers and even numbers and their sum respectively. B 5. Input two number A and B and calculate A . 6. Write a program to print all the magin numbers (sum & product of all digit must be equal) from 1 to 1000. 7. Calculate sum of digit. 8. Reverse a given number. 9. Write a program to check wheather a given number is palindrome or not. 10. Print all the palindrome numbers from 1 to 1000. 11. Write a program to check wheather a given number is triad( sum of cube of all digits equal to number itself) or not. 12. Write a program to print all triad numbers from 1 to 1000. 13. Input and add the random numbers given by user untill the user presses zeor(0). 14. Input and add ten random numbers. User can also terminate the loop by pressing zeor(0). 15. Calculate factorial to 1 to N 16. Print the table of 1 to N 17. Print all the factors of a given number.

18. 19. 20. 21.

22. 23.

Calculate and print sum of digits of a given number. Then calculate the sum of digits of the result untill you get a single digit number. Write a program to convert a decimal number into its binary equivalent. Write a program to convert a binary number into its decimal equivalent. Write a program to print the possible denomination for a sum of amount. For example the denomination for amount 3962 would be 3*1000, 1*500, 4*100, 1*50, 1*10, 1*2. Calculate reminder and quotioned part of an expression without using any division operator. Write a program for the snake and ledder game.

MISCELLANEOUS: 1. Input two amounts in Rs and Paisa and Add them.


2. For example: 5 Rs. and 76 Paisa + 9 Rs and 58 Paisa = 15 Rs. and 34 Paisa Input two time values in Hours, Minuts,and second and add them.

3. 4. 5. 6. Logical 1. 2. 3. 4. 5.

Write a program to print fibonachi series Wrtie a program for pascal tringle. Find out the diffrence of two given dates.

Swap the values of two variables without using third variable Reverse a string without using SUBSTR function in foxpro. Make a User Defined Function to perform the same tast as SUBSTR does in fox pro. Calculate reminder and quotient part of an expression without using any division operator. Input three dates DATE1, DATE2, and DATE3 and find out wether the DATE2 lies between DATE1 and DATE2. You can only use DAY(), MONTH() and YEAR() library function. You can try this without useing these function.

DO CASE: 1. Write a menu driven program to calculate area of SQUARE, RECTANGLE, CIRCLE, AND TRIANLE. 2. Write a menu driven program to

ARRAYS: 1. Calculate the sum & average of all the elements of an array of 10 elements. 2. Calculate the sum of all odd and even elements of an array of 10 elements. 3. Calculate the sum of all elements in odd & in even positions in an array of 10 elements. 4. Sort an array. 5. Find the sum of all elements of a double dimension array 6. Find the sum of all rows of a double dimension array 7. Find the sum of all coloumns of a double dimension array 8. Find the sum of both digonals of a double dimension array 9. Transpose a dobuble dimension array. 10. Print the mirror image of a double dimension array. 11. Print the mirror image of a double dimension array against the original array. 12. Write a program for addition of two [ 3 by 3]matrix. 13. Write a program for multipication of two [ 3 by 3]matrix.

STRINGS : 1. Find the length of a string.(C Language) 2. Print a string in following pattern:

a. C CO COM COMP COMPU COMPUT COMPUTE COMPUTER d. C OM MPU PUTE UTER

b.

R c. ER TER UTER PUTER MPUTER OMPUTER COMPUTER

C O M P U T E R

3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13.

Print evry third character of a string. Count the number of vowles in a given string. Print a string in reverse order. Find the frequency of a given character in a string. Find a given word in a string. Find out wether or not.a given pattern exists in a string. Count the frequency of a given word in a string. Print the initials of a given name. Count the frequency of each word in a given string. Count the frequency of each word in a given string and print them in the ascending order of their frequency. Count the frequency of each word in a given string and print them in the ascending order of their frequency. For the words having same frequency the words should be ordered in alphabetic order.

14.

You might also like