Search
 
SCRIPT & CODE EXAMPLE
 

C

add 2 numbers in c

#include<stdio.h>
int main() {
int a, b, sum;
printf("
Enter two no: ");
scanf("%d %d", &a, &b);
sum = a + b;
printf("Sum : %d", sum);
return(0);
Comment

c program to add two numbers

Enter two integers: 12
11
12 + 11 = 23
Comment

add 2 numbers in c

#include <stdio.h>

int addNumbers(int a, int b)
{
    int sum = a + b;
    return sum;
}

int main(void)
{
    int a = 4;
    int b = 7;

    printf(addNumbers(a,b));
    return 0;
}
Comment

C program to addition of two numbers

#include <stdio.h>int main(){ int a, b, sum;printf("Enter two integers");scanf("%d %d", &a, &b);sum = a + b; printf("%d + %d = %d", a, b, sum);return 0;}
Comment

Write a c program to add two numbers without using addition operator.

#include <stdio.h>
#include <stdlib.h>
int main()
{
    int num1,num2,i;  //Variable declaration
    printf("Enter the first number: ");
    scanf("%d",&num1); 
    printf("Enter the second number: ");
    scanf("%d",&num2);
    for(i=0; i<num2; i++){
   num1++;
    }
printf("Sum of two numbers : %d ",num1);
    return 0;
}
Comment

PREVIOUS NEXT
Code Example
C :: write to file in c programming 
C :: nosql injection 
C :: c check if file was created 
C :: vs code turn off formatter 
C :: linked list in c 
C :: C Increment and Decrement Operators 
C :: c code to algorithm converter online 
C :: calendar in c 
C :: #include <sys/time.h int main() { timespec ts; // clock_gettime(CLOCK_MONOTONIC, &ts); // Works on FreeBSD clock_gettime(CLOCK_REALTIME, &ts); // Works on Linux } 
Dart :: flutter listtile shape border 
Dart :: TextStyle underline flutter 
Dart :: flutter get current date 
Dart :: datetime dart format print 
Dart :: flutter appbar width 
Dart :: flutter replace character in string 
Dart :: scroll to top flutter 
Dart :: dart timer repeat 
Dart :: flutter types class enum 
Dart :: The build failed likely due to AndroidX incompatibilities in a plugin. The tool is about to try 
Dart :: flutter flotingactionbutton 
Dart :: flutter compare dates 
Dart :: dart square root 
Dart :: flutter tooltip padding 
Dart :: floting action button small size 
Dart :: get one document firestore flutter dart 
Dart :: flutter flat button size 
Dart :: flutter column min height screen sixe 
Dart :: convert string to double flutter 
Dart :: flutter run in background every second 
Dart :: flutter appbar default padding 
ADD CONTENT
Topic
Content
Source link
Name
1+1 =