#include<stdio.h>
#include<conio.h>
int main()
{
long int num,sum;
clrscr();
printf("ENTER ANY NUMBER\n");
scanf("%ld",&num);
sum=(num*(num+num))/2;
printf("Sum of the given range is %d",sum);
getch();
}
by dilkash
from MANUU.
for(int i=0;;i++)
{
i+=i;
}
///////but you have to write condition or the number to stop looping
#inlcude<stdio.h>
#include<conio.h>
int main()
{
int a,b=0,n;
printf("enter a number\n");
scanf("%d",&n);
while(n>=1)
{
a=n%10;
b=b+a;
n=n/10;
}
printf("sum of the digit is%d",b);
getch();
return(0);
}
#include <stdio.h>
int main()
{
int total=0, i;
for (i=1;i<=100;++i) total+=i;
printf("%d\n",total);
}
To calculate the size of array the type of array should be given. Ex: if it is of integer type that means int arr[100] and integer is of 4 bytes, then the size of array will be 400 bytes.
fd 60 rt 100 fd 60 rt 100 fd 60 rt 100 fd 60
In visual basic: Module Module1 Sub Main() Dim Inst As Integer For Inst = 0 To 100 Step 2 Console.WriteLine(Inst) Next End Sub End Module
seq 1 2 99
int i, sum; /* example using while */ sum = 0; i = 1; while (i <= 100) { sum += i; ++i; } /* example using for */ sum = 0; for (i = 1; i <= 100; ++i) sum += i;
Write a function that implements an algorithm that checks to see if a particular integer is prime (returning a boolean). Write a program that uses that function on each number from 1 to 100, and if true, displays that number.
The integer (numeral) version is 100, and the written spelling is "one hundred" or "hundred."
To write a percentage number as an integer, you can simply remove the percentage sign and divide the number by 100. For example, to write 75% as an integer, you divide 75 by 100, which equals 0.75.
Why not try it out? See if you can find an integer which, when squared, gives you 100. Or: use a calculator and calculate the square root of 100. If you get an integer, then the answer to the question is "yes"; otherwise the answer is "no".
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
float income_tax (float income, float tax_percent) { return income * tax_percent / 100; }
The largest integer equal to -100 is -100. The largest integer less than -100 is -101.
To calculate the size of array the type of array should be given. Ex: if it is of integer type that means int arr[100] and integer is of 4 bytes, then the size of array will be 400 bytes.
Is the square root of a 100 is a integer
53100 is an integer and so is in its simplest form.
100 IS an Integer. An integer is any positive or negative whole number (not a fraction number, and not zero).
VBnet program to find the prime numbers between 100 to 200?