Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions add.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include <stdio.h>

int main() {
void main() {
int num1, num2, sum;

printf("Enter the first number: ");
Expand All @@ -11,7 +11,7 @@ int main() {

sum = num1 + num2;

printf("The sum of %d and %d is %d.", num1, num2, sum);
printf("The sum of %d and %d is %d.", num1, num2, sum)

return 0;
yellloo
}
10 changes: 10 additions & 0 deletions div.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#include<stdio.h>
int main()
{
int num1,num2;
float div;
printf("\tEnter Two Numbers\n");
printf("---------------------------\n");
printf("Enter First Number : ");

}
14 changes: 14 additions & 0 deletions mul.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#include <stdio.h>
int main() {

int number1, number2, sum;

printf("Enter two integers: ");
scanf("%d %d", &number1, &number2);

// calculate the sum
sum = number1 + number2;

printf("%d + %d = %d", number1, number2, sum);
return 0;
}
14 changes: 14 additions & 0 deletions sub.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#include<stdio.h>
int main(){
int num1, num2, difference;

//Asking for input
printf("Enter first number: ");
scanf("%d", &num1);
printf("Enter second number: ");
scanf("%d", &num2);

difference = num1 - num2;
printf("Difference of %d and %d is: %d", num1, num2, difference);
retu
}