[wpdts-weekday-name], [wpdts-days] [wpdts-month-name], [wpdts-year]

[wpdts-time] [NEPAL, GMT+5:45]

Category: WAP

WAP to check whether the given number is Palindrome.

WAP to check whether the given number is Palindrome.

Question Write a program to check whether the given number is palindrome. Ans:       INPUT “Enter the Number ” ; NUM       N = NUM       DO                   DIGIT = NUM MOD 10       REVERSE = REVERSE * 10 + DIGIT       NUM = NUM 10       LOOP WHILE NUM < > 0      …

C Programming, WAP

WAP to enter name and marks of three subjects & print average marks

WAP to enter name and marks of three subjects & print average marks

Question: Write a program to enter name and marks of three subjects. Find out the average and print the output.   Answer: DEFSTR n DEFINT a–e INPUT “Enter Name of Student:”; n          INPUT “Enter Marks of English :”; a INPUT “Enter Marks of Nepali :”; b INPUT “Enter Marks of Maths :”; c LET d…

C Programming, WAP

WAP to calculate the Volume of a Sphere

WAP to calculate the Volume of a Sphere

Questions: The volume of a sphere is given by the formula v = 4/3pr³. Given the value of the radius r, write a program to calculate the volume of a sphere. Ans:           CLS       pi = 3.141       INPUT “Enter a radius” ; r       v = 4/3*pi*r^3       PRINT “The volume of a…

C Programming, WAP

WAP to find the cost of painting the four walls of a room

WAP to find the cost of painting the four walls of a room

Question Write a program to find the cost of painting the four walls of a room. Ans:           CLS       INPUT “Enter length of the room”;l       INPUT “Enter breadth of the room”; b       INPUT “Enter height of the room”; h       INPUT “Enter the cost of painting”; c       LET a = (2…

C Programming, WAP

WAP that converts Centigrade Temperature to Fahrenheit Temperatures

WAP that converts Centigrade Temperature to Fahrenheit Temperatures

Question: Write a program that converts centigrade temperature to Fahrenheit temperatures. The formula is: F = (9/5)*C+32. F is the Fahrenheit temperature and C is the Centigrade temperature.   Ans:       REM “Converts a temperature from Centigrade to Fahrenheit”       CLS ‘Clear the screen       INPUT “Enter the temperature in centigrade”; C      …

C Programming, WAP