Develop Computer Program Assignment
Develop Computer Program Assignment
1) Write a java and C program that prints “Hurray!!Friends College Kaimosi is the best
Institution”
2) Write a Java and C program to calculate the area of a circle given its radius.
3) Write a Java and C program to declare and initialize variables of different data types and print
their values.
4) Write a Java and C program to convert temperature from Fahrenheit to Celsius given the
5
formulae Celsius= (Fahrenheit -32) * .
9
5) Write a Java and C program to perform basic arithmetic operations on two numbers.
6) Write a Java and C program to swap the values of two variables without using a third variable.
7) Write a java and C program that prompts the user to enter two numbers and then prints their
sum
8) Write a program in java and C to prompt a user to enter their age and then determine and print
whether they are eligible to vote or not
Operators
Control Structures
1) Write a Java and C program to implement a simple calculator using switch statements.
2) Write a Java and C program to print the Fibonacci series up to a specified number of terms.
3) Write a Java and C program to check if a number is prime (use if …else statement).
4) Write a Java and C program to print a pattern of stars using nested loops.
5) Write a Java and C program to find the factorial of a number using a while loop.
6) Write a Java and C program to calculate the sum of odd number from 10 to 30 using for loop.
7) Write a Java and C program that displays all even numbers from 40 to 60
8) Write a Java and C program that prompts a user to enter the score. Students who scores
below 40% are forced to repeat the unit (the program should display “Below average,
repeat the unit” and those who scores above 40% are given rewards for their
performance(program should display “ give reward”
9) Write a program in Java and C language that enumerates the days of the week.The
program then displays a message”IT IS A WEEKDAY” if the day ranges between
Monday and Friday otherwise “IT IS A WEEKEND”.