Showing posts with label C Program. Show all posts
Showing posts with label C Program. Show all posts

Thursday, 7 November 2024

Write a program to Area of Rectangle in C

 #include <stdio.h>


int main() {

    int a,b,area;

    printf("Enter side lenth a");

    scanf("%d",&a);

printf("Enter side lenth b");

    scanf("%d",&b);

    area = a*b;

    printf("area of rect is:%d",area);

    return 0;

}

*******************************Output*****************************************

Enter side lenth a5

Enter side lenth b10

area of rect is:50


=== Code Execution Successful ===

Friday, 6 September 2024

Write a program to Multiplication in C

 *******Write a program to Multiplication in C *******

#include<stdio.h>

#include<conio.h>

void main()

{

clrscr();  //Previous screen clear

int a,b,c;

printf("Enter Two Num:");

scanf("%d %d",&a,&b);

c=a*b;

printf("The Multiplication is %d\n",c);

getch();

*********************************Output *************************************

Enter Two Num: 5 5

The Multiplication is  25


Write a program to Division in C

 *******Write a program to Division in C *******

#include<stdio.h>

#include<conio.h>

void main()

{

clrscr();  //Previous screen clear

int a,b,c;

printf("Enter Two Num:");

scanf("%d %d",&a,&b);

c=a/b;

printf("The Division is %d\n",c);

getch();

}

===================================Output=================================

Enter Two Num: 10 5

The Division is :2

Write a program to Subtraction in C

 *******Write a program to Subtraction in C *******

#include<stdio.h>

#include<conio.h>

void main()

{

clrscr();  //Previous screen clear

int a,b,c;

printf("Enter Two Num:");

scanf("%d %d",&a,&b);

c=a-b;

printf("The Sub is %d\n",c);

getch();

}

*************************************Output****************************************

Enter Two Num : 10 5

The Sub is : 5


Write a program Addition Two Number in C

#include<stdio.h>

#include<conio.h>

void main()

{

clrscr();  //Previous screen clear

int a,b,c;

printf("Enter Two Num:");

scanf("%d %d",&a,&b);

c=a+b;

printf("The Sum is %d\n",c);

getch();

}


Output:

******************************************

Enter Two Num:2   2

The Sum is 4


Friday, 23 August 2024

Write a program Arithmatic of Two Number in C

#include<stdio.h>

#include<conio.h>

void main()

{

int a,b,c;

clrscr();

printf("Enter Two Num:");

scanf("%d %d",&a,&b);

c=a+b;

printf("The Addition is:%d\n",c);

c=a-b;

printf("The Substratcion is:%d\n",c);

c=a*b;

printf("The Multiplicationn is:%d\n",c);

c=a/b;

printf("The Division is:%d\n",c);

getch();

}



Data Science using Spreadsheet Software Assignment 3

Printing Workbooks select the cells you want to print and then set that area as the print area   Steps to set a print area: Select the cells...