Latest Post

Write a C++ program that inputs marks and displays "Congratulations! You have passed". If the marks are 40 or more.

Write a C# program to print the following message.

 Write a C# program to print the following message. C O M P U T E R I S A W O R L D O F S C I E N C E using System; using System.Collections...

Write a JAVA program to print the following message

package pattern; public class Pattern {     public static void main(String[] args) {         System.out.println ( "C") ;         ...

Write a C++ program to print the following message.

  #include<iostream> using namespace std; int main() { cout<< "C" <<endl; cout<< "O M" <&...

Write a C++ program that will prompt the user to enter the current rates of electricity, gas and petrol per unit. Give each item's rate and increment of 10% . Compute and display the prices per unit of electricity, gas, and petrol.

#include<iostream> using namespace std; int main() { int e1, e2, g1, g2, p1, p2; cout<< "Enter current Electricity rate...

Write a program that inputs an even and odd number through keyboard, multiples even with 5 and odd with 3 and odds both results. It subtracts the result from 1000 and finally prints the difference.

#include<iostream> using namespace std; int main() { int even, odd, r; cout<<"Enter an even number: "; cin>&g...

Write a JAVA program that performs all mathematical operations on two variables.

  public class MathemacticaOperations{ public static void mai n(String[] args) {        int num1 = 5, num2 = 10;       int sum;       int d...

JAVA program add two numbers.

  package add2num; public class ADD2num {    public static void main(String[] args) {          int first=123;         int second=321;     ...

Write a C++ program that inputs a five digit number as input and reverse the number.

  #include<iostream> using namespace std; int main() { int n, a, b, c, d; cout<< "Enter 5-digit number: "; cin&g...

Write a JAVA Program to calculate and print the area of square with given height and width.

  package area; public class Area {     public static void main(String[] args) {                 int height; int width; int area; ...

Write a C++ program that calculates the final velocity of an object by taking following inputs from the user: vi = Initial velocity, a = acceleration, t = time span. Formula vf = vi + at.

  #include<iostream> using namespace std; int main() { int vi, vf, a, t; cout<< "Enter the initial velocity: "; ...

Write a C++ program that inputs radius from the user and calculates area and circumference using the formula Area = πR2 and circumference = 2πR.

  #include<iostream> using namespace std; int main() { float area, radius, circle; cout<< "Enter radius: " ; cin...

Write a C++ program that convert a person's height from inches to centimetres using the formula 2.54* height.

  #include<iostream> using namespace std; int main() { float height_in_cent; float height; cout<< "Enter height in in...

Write a C++ program that gets temperature from the user in Celsius and converts it into Fahrenheit using formula F=9/5*C+32.

  #include<iostream> using namespace std; int main() { float cel, faren; cout<< "Enter temperatue in Celcius: " ; ...

Write a program that inputs time in second and converts it into hh-mm-ss format.

  #include<iostream> using namespace std; int main() { int sec, s, m, h; cout<< "\n Enter time in second: " ; ci...

Write a C++ program that inputs base and height from the user. It calculates and displays the area of a triangle by using formula Area = 1/2 * Base * Height.

#include<iostream> using namespace std; int main() { float base, height; double area; cout<< "Enter base: " ; ...

Write a C++ program that inputs the distance traveled and the speed of vehicle. It calculates the tine required to reach the destination and displays it.

  #include<iostream> using namespace std; int main() { double distance, time, speed; cout<< "Enter the distance travele...

Write a C++ program that inputs two numbers, swap these values without using third variable and display them.

#include<iostream> using namespace std; int main() { int x, y; cout<< "\n Enter 2 Integers respectively: " ; cin...

Write a C++ program that inputs two numbers, swap the values and then displays them.

  #include<iostream> using namespace std; int main() { int a, b, temp; cout<< " Enter the First number: " ; cin&...