FRIENDS COLLEGE KAIMOSI
DEPARTMENT OF COMPUTING AND INFORMATICS
UNIT: DEVELOP COMPUTER PROGRAM (C AND JAVA PROGRAMMING)
ICT TECHNICIAN LEVEL 6
COMPUTER LAB MANUAL 1 2023
Data Types and Variables
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
1) Write a Java and C program to check if a number is even or odd.
2) Write a Java and C program to calculate the simple interest.
3) Write a Java and C program to determine if a given year is a leap year.
4) Write a Java and C program to find the roots of a quadratic equation.
5) Write a Java and C program to perform bitwise AND and OR operations on two integers.
6) Write a Java and C program that prompt a user to enter two numbers X and Y, divide
X by Y .However, if the value of Y is 0, the program should display error message
“error, Division by zero.”
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”.