-
Notifications
You must be signed in to change notification settings - Fork 448
/
Adding-two-number.c
47 lines (38 loc) · 924 Bytes
/
Adding-two-number.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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
//code for hactoberfest2020
#include <stdio.h>
int main()
{
int x, y, z;
printf("Enter two numbers to add\n");
scanf("%d%d", &x, &y);
z = x + y;
printf("Sum of the numbers = %d\n", z);
return 0;
#include <stdio.h>
void main() {
int num1,num2;
printf("Enter first number:");
scanf("%d",&num1);
printf("Enter second number:");
scanf("%d",&num2);
printf("%d + %d = %d",num1,num2,num1 + num2);
}
#include <stdio.h>
void main() {
int number1, number2, sum;
printf("Enter two integers: ");
scanf("%d %d", &number1, &number2);
sum = number1 + number2;
printf("%d + %d = %d", number1, number2, sum);
return 0;
}
//created by rupali
#include<stdio.h>
void main(){
float n1,n2,mul;
printf("\nEnter number1:");
scanf("%float",&n1);
printf("\n Enter number2:");
scanf("%f",&n2);
printf("Result of addition of two numbers:%f",n1+n2);
}