-
Notifications
You must be signed in to change notification settings - Fork 0
/
Lab1.c
33 lines (30 loc) · 867 Bytes
/
Lab1.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
/*
* File: main.c
* Author: weiliche
*
* Created on September 22, 2015, 2:58 PM
*/
#include <stdio.h>
#include <stdlib.h>
/*
*
*/
int main(int argc, char** argv) {
int firstNumber,secondNumber;
printf("Enter First Number: ");
scanf("%d",&firstNumber);
printf("Enter Second Number: ");
scanf("%d",&secondNumber);
int sum,difference,squareOfNumber1,squareOfNumber2,division;
sum=firstNumber+secondNumber;
difference=firstNumber-secondNumber;
squareOfNumber1=firstNumber*firstNumber;
squareOfNumber2=secondNumber*secondNumber;
division=secondNumber/firstNumber;
printf("Sum: %d\n",sum);
printf("Difference: %d\n",difference);
printf("Square of Number 1: %d\n",squareOfNumber1);
printf("Square of Number 2: %d\n",squareOfNumber2);
printf("Division: %d",division);
return (EXIT_SUCCESS);
}