#include<stdio.h>
main()
{
long int num1, num2;
long int sum=0;
printf("Enter Value=");
scanf("%ld", &num1);
printf("Enter Value=");
scanf("%ld", &num2);
sum=num1+num2;
printf("The Result is=%ld", sum);
}
Write a program in c++ that take input in a integer matrix of size 4*4 and find out if the entered matrix is diagonal or not.
Option Explicit Dim a as integer Dim b as integer Dim c as integer Dim result as integer a=val(text1.text) b=val(text2.text) c=val(text3.text) result=a+b+c 'now we want to push the result to another text box ,below code insert into the button click event text4.text=result text1.text="" text2.text="" text3.text="" Rename the cmd button As sum. And run the program by pressing F5 key.
In a three digit integer number the tenthsdigit is always 0 as integer numbers are whole numbers and have no decimal part and tenths are decimal parts:tenths_digit_of_integer_number = 0I suspect you mean "How to find the tens digit of an integer number?"; this is the second from the right, so:tens_digit = (INT(number ÷ 10)) MOD 10For example, in C this would become: tens_digit = (number / 10) % 10;
find even number in array
sum = 0; for (int i = 12; i
71 is, itself an integer but to find a difference you require 3 numbers.71 is, itself an integer but to find a difference you require 3 numbers.71 is, itself an integer but to find a difference you require 3 numbers.71 is, itself an integer but to find a difference you require 3 numbers.
The following is for F95 and later (due to the use of intrinsic SUM ): My assumptions: -Your numbers are integers -Your numbers are stored in an array -The numbers you are describing are 0-100 program findSum !I assumed integer, replace this with your data type integer, dimension(100) :: numbers integer :: sumOfNumbers !We populate an array with our numbers !Replace this with your numbers do i=1,(size(numbers)+1) numbers = i end do !We find the sum of those numbers sumOfNumbers = sum(numbers) !We write out the sum to prompt write(*,*) 'Sum is: ', sumOfNumbers end program findSum
Initialise an unsigned integer to zero. As each number is input, increment the running total accordingly. When all numbers are input, display the total.
You need at least two numbers to find an LCM.
program to find maximum of two numbers using pointers
You need at least two numbers to find an LCM and they both have to be integers, but the LCM of 1 and any positive integer is that integer.
Use %o
VBnet program to find the prime numbers between 100 to 200?
write an assembly language program to find sum of N numbers
you find out missing numbers in addition by subtracting the numbers that are writen
The numbers are 9 and 10.
Subtraction