“Addition in c” Code-Antworten

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: \n"); //Prompts user to enter the first number.
    scanf("%d", &a);//Accepts input and saves it to variable a
    printf("Enter the second number: \n");
    scanf("%d", &b);
    sum = a + b; //Formular to add the two numbers.
    printf("Sum is %d", sum);
}
VinCoD

Addition.C

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

Zugabe von zwei Zahlen in c

//test
Colorful Crossbill

Ähnliche Antworten wie “Addition in c”

Fragen ähnlich wie “Addition in c”

Weitere verwandte Antworten zu “Addition in c” auf C

Durchsuchen Sie beliebte Code-Antworten nach Sprache

Durchsuchen Sie andere Codesprachen