Posts

Showing posts with the label Arithmetic In C

C Program To Find Division Of Two Numbers

Image
  C Program To Find Division  of two numbers In this example, you will learn to calculate Division Of Two Numbers Using printf() And scanf() Functions. How Program Works ?? This Program Can Be Run By Two Ways (1) Using printf() Or  (2) Using scanf()  We Use (/) Operators To Calculate Division If You Entered a=10 And B=5 Then It Represent As div   = a / b; where a = 10 , b = 5 And Answers Which Div = 2; Code For  " Division Of Two Numbers  ", Using   printf() Function. /* Author --> HARSH PATEL */ #include<stdio.h> void main() { int a = 10; //You Can Add Any Number int b = 5; //You Can Add Any Number int c = a / b; //Now int C Calculate division Of Two Numbers Which You Added On a & b printf("Division Of Two Numbers = %d",c); } OUTPUT For "Division  Of Two Numbers  ", Using   printf()     Function. Division Of Two Numbers = 2 Now Using   scanf()  Function . N...

C Program To Find Multiplication Of Two Numbers

Image
  C Program To Find  multiplication of two numbers In this example, you will learn to calculate Multiplication Of Two Numbers Using printf() And scanf() Functions. How Program Works ?? This Program Can Be Run By Two Ways (1) Using printf() Or  (2) Using scanf()  If You Entered a=10 And B=10 Then We Use (*) Asterisk Operators To Calculate Multiplication It Represent As multiplication   = a * b; where a = 10 , b = 10 And Answers Which Multiplication  = 100; Code For  "  multiplication  Of Two Numbers  ", Using   printf() Function. /* Author --> HARSH PATEL */ #include<stdio.h> void main() { int a = 10; //You Can Add Any Number int b = 10; //You Can Add Any Number int c = a * b; //Now int C Calculate multiplication Of Two Numbers Which You Added On a & b printf("Multiplication Of Two Numbers = %d",c); } OUTPUT For " Multiplication Of Two Numbers  ", Using   p...

C Program To Find Subtraction Of Two Numbers

Image
  C Program To Find  subtraction of two numbers In this example, you will learn to calculate Subtraction Of Two Numbers Using printf() And scanf() Functions. How Program Works ?? This Program Can Be Run By Two Ways (1) Using printf() Or  (2) Using scanf()  If You Entered a=30 And B=20 Then It Represent As sub   = a - b; where a = 30 , b = 20 And Answers Which Sub = 10; Code For  " Subtraction Of Two Numbers  ", Using   printf() Function. /* Author --> HARSH PATEL */ #include<stdio.h> void main() { int a = 50; //You Can Add Any Number int b = 40; //You Can Add Any Number int c = a - b; //Now int C Calculate subtraction Of Two Numbers Which You Added On a & b printf("Subtraction Of Two Numbers = %d",c); } OUTPUT For " Subtraction Of Two Numbers  ", Using   printf()     Function. Subtraction Of Two Numbers = 10 Now Using   scanf()  Function . Now Code For  " Find...

C Program To Find Sum Of Two Numbers

Image
  C Program To Find sum of two numbers In this example, you will learn to calculate Sum Of Two Numbers Using printf() And scanf() Functions. How Program Works ?? This Program Can Be Run By Two Ways (1) Using printf() Or  (2) Using scanf()  If You Entered a=10 And B=15 Then It Represent As sum = a + b; where a = 10 , b = 15 And Answers Which Sum = 25; Code For  " Find Sum Of Two Numbers  ", Using   printf() Function. /* Author --> HARSH PATEL */ #include<stdio.h> void main() { int a = 10; //You Can Add Any Number int b = 20; //You Can Add Any Number int c = a + b; //Now int C Calculate Sum Of Two Numbers Which You Added On a & b printf("Sum Of Two Numbers = %d",c); } OUTPUT For  Sum Of Two Numbers  ", Using   printf()    Function. Sum Of Two Numbers = 30 Now Using  scanf()  Function . Now Code For  " Find Sum Of Two Numbers  ", Using   scanf()  Funct...