Search
 
SCRIPT & CODE EXAMPLE
 

C

addition in c

/*Program for adding two numbers*/
#include <stdio.h>
int main(){
	int a, b, sum; //declare the variables that will be used, a will store the first number, b second number and sum, the sum.
    printf("Enter the first number: 
"); //Prompts user to enter the first number.
    scanf("%d", &a);//Accepts input and saves it to variable a
    printf("Enter the second number: 
");
    scanf("%d", &b);
    sum = a + b; //Formular to add the two numbers.
    printf("Sum is %d", sum);
}
Comment

addition.c

#include<conio.h>
#include<stdio.h>
{
int a,b;
a=2;
b=10;
a=a+b;
printf("%d",&a);
getch();
}
Comment

c addition

#include<stdio.h>
#include<conio.h>
#include<math.h>

int main()
{
	int a,b,sum;
	sum=a+b;
	
	printf("
 enter the first number %d:");
	printf("
 enter the second number %d:");
	scanf("%d",&a,&b)
	printf("%d",sum);
}
Comment

PREVIOUS NEXT
Code Example
C :: snprintf with malloc 
C :: are two matrcies identical 
C :: not repeated serial number in c 
C :: Word Processor, Spreadsheet and Presentation Software are the examples of 
C :: c programming trinary if 
C :: create a buffer in c 
C :: perfect numbers in c 
C :: array of pointers to functions 
C :: matrix of string in c 
C :: how to push node using linked list c 
C :: c triangle check if triangle is 90 degrees 
Dart :: flutter listtile shape 
Dart :: flutter flotingactionbutton position 
Dart :: python change type of elements in list 
Dart :: flutter rounded ElevatedButton 
Dart :: card border radius in flutter 
Dart :: make scaffold scrollable flutter 
Dart :: flutter array of strings 
Dart :: flutter chip labelstyle 
Dart :: change font size flutter 
Dart :: fix overflow flutter 
Dart :: no scroll physics flutter 
Dart :: dart square root 
Dart :: flutter check if platform is ios or andriod 
Dart :: dart list remove range 
Dart :: math.round dart 
Dart :: dart write to file 
Dart :: how to convert timestamp to datetime in dart 
Dart :: dart custom exception 
Dart :: dart extension 
ADD CONTENT
Topic
Content
Source link
Name
1+3 =