Computer Science, asked by Greshiblushy, 1 year ago

write a program to accept a number and find the sum of two numbers using input statement

Pls help!!​

Answers

Answered by gurukulamdivya
0

Answer:

#include<stdio.h>

int main()

{

  int a, b, c;

  printf("Enter two numbers to add\n");

  scanf("%d%d", &a, &b);

  c = a + b;

  printf("Sum of the numbers = %d\n", c);

  return 0;

}


Greshiblushy: I'll mark u as brainliest
abhinavkally90344: no I can't do it step by step
Greshiblushy: ok but can u help me with questions which i will ask
gurukulamdivya: import java.util.Scanner;
class AddNumbers
{
public static void main(String args[])
{
int x, y, z;

System.out.println("Enter two integers to calculate their sum");
Scanner in = new Scanner(System.in);

x = in.nextInt();
y = in.nextInt();
z = x + y;

System.out.println("Sum of the integers = " + z);
}
}
gurukulamdivya: is this ok
Greshiblushy: no
Greshiblushy: i am sorry to tell u
Greshiblushy: but i want with input statement
Greshiblushy: its ok
Greshiblushy: thank u very much for ur help
Answered by abhinavkally90344
0

Answer:

in Excel

use formula : =1a +2a

Similar questions