Tag: Simple
Posts of Tag: Simple
  1. C Program to Calculate Simple Interest

    Here you will get C program to calculate simple interest. The formula for simple interest is given below: P x r x t รท 100 Where, P is principal, r is rate and t is time. Lets have a look on program to calculate...Learn More
    C ProgramsSimpleProgramming Languages
  2. C program to raise any number x to a positive power n

    #include <stdio.h> #include <conio.h> #include <math.h> void main() { int x, n, result; clrscr(); //to clear the scrren printf("Enter value of x and n:"); scanf("%d%d", &x...Learn More
    C ProgramsSimpleProgramming Languages
  3. C program to convert given number of days into years, weeks and days

    C program to convert given number of days into years, weeks and days In this C program you will know how to convert given number of days into years, weeks and days. For example: If user enter 1234 days then. Ye...Learn More
    C ProgramsSimpleProgramming Languages
  4. C program to print ASCII value of a character

    #include <stdio.h> #include <conio.h> void main() { int a; char ch; clrscr(); //to clear the screen printf("Enter any character:"); scanf("%c", &ch); a = ch; printf...Learn More
    C ProgramsSimpleProgramming Languages
  5. C program that accepts marks in 5 subjects and outputs average marks

    #include <stdio.h> #include <conio.h> void main() { int a, b, c, d, e, average; clrscr(); printf("Enter marks of subject 1:"); scanf("%d", &a); printf("Enter marks of subje...Learn More
    C ProgramsSimpleProgramming Languages
  6. C program that accepts radius of a circle and print its area

    #include <stdio.h> #include <conio.h> void main() { float radius, area; clrscr(); //to clear the screen printf("Enter radius of the circle:"); scanf("%f", &radius); area = 3...Learn More
    C ProgramsSimpleProgramming Languages
  7. C Program to Add Two Numbers

    Here you will get simple C program to add two numbers. User will input two numbers, then their sum will be calculated and finally it will be printed on screen. The program is given below. C Program to Add Two N...Learn More
    C ProgramsSimpleProgramming Languages
  8. C program to print a message on the screen

    #include <stdio.h> #include <conio.h> void main() { clrscr(); //to clear the screen printf("nnnnttt***** Welcome to C Programming *****"); getch(); //to stop the screen } ...Learn More
    C ProgramsSimpleProgramming Languages
  9. C Program to Calculate Compound Interest

    Here you will get C program to calculate compound interest. The program asks user to enter value of principle (p), rate (r) and time (t) and finally calculates the compound interest by following formula. Compou...Learn More
    C ProgramsSimpleProgramming Languages
  10. C program to print size of different data types

    #include <stdio.h> #include <conio.h> void main() { clrscr(); printf("TypettttSize (bytes)"); printf("nCharacterttt %d", sizeof(char)); printf("nIntegertttt %d", sizeof(int));...Learn More
    C ProgramsSimpleProgramming Languages
  11. C++ program to swap two numbers without using temp variable

    C++ program to swap two numbers without using temp variable #include <iostream.h> #include <conio.h> void main() { clrscr(); int a, b; cout << "Enter value of a:"; cin >>...Learn More
    C++ ProgramsSimpleProgramming Languages
  12. Program for Square Root in C++

    Program for Square Root in C++ Square root in C++ can be calculated using sqrt() function defined in math.h header file. This function takes a number as an argument and returns the square root of that number. ...Learn More
    C++ ProgramsSimpleProgramming Languages