About 6,450,000 results
Open links in new tab
  1. C Program to Add Two Integers

    In this program, the user is asked to enter two integers. These two integers are stored in variables number1 and number2 respectively. printf("Enter two integers: "); scanf("%d %d", &number1, …

  2. c - How to add the numbers inside the scanf in loop ... - Stack Overflow

    Feb 27, 2021 · #include <stdio.h> main() { int z, x; printf("Enter a number:\n"); z = 0; scanf("%d", &x); do { z += x; scanf(" %d", &x); } while (x >= 0); printf("Sum = %d ", z); return 0; }

  3. scanf in C - GeeksforGeeks

    6 days ago · In C, scanf () provides a feature called scanset characters, which allows you to read custom pattern of input. For example, reading only specific characters, reading text with …

  4. C Program to Add two numbers - BeginnersBook

    Jul 22, 2022 · In this tutorial, you will learn how to write a C program to add two numbers. This is a very basic C program where user is asked to enter two integers and then program takes …

  5. C Examples - Addition | ArunEworld | C Interview Questions

    Our program will prompt the user to enter two integers, then it will add them together and display the result. We’ll achieve this using basic input/output functions (printf() and scanf ()) for user …

  6. C Program to Add two numbers given by the user - Studytonight

    Feb 9, 2022 · C Program to Add two numbers given by the user. In C language, to read the inputs we use the scanf() function, and then to print the result we use the printf() function. The %d …

  7. Addition of Two Numbers in C - Sanfoundry

    Write a C program to add two numbers. 1. Take two numbers as input. 2. Find the sum of two numbers using function and “ + ” operator. 3. Print the final result and exit. Addition of Two …

  8. C program to add two numbers - Codeforwin

    May 13, 2015 · */ printf("Enter first number: "); scanf("%d", &num1); printf("Enter second number:"); scanf("%d", &num2); /* Adding both number is simple and fundamental */ . sum = …

  9. C program to add two numbers - CODEDOST

    This C Program is to add two numbers or to find the sum of two numbers. Logic. I have taken three integer variables a,b and sum.We have two store two numbers which we want to add by …

  10. C Program to Add Two Integers - GeeksforGeeks

    Jan 10, 2025 · In C, we can add two numbers easily using addition operator (+). This operator works by taking two operands and returns their sum as the result. Output. Explanation: In the …

  11. Some results have been removed
Refresh