answersLogoWhite

0

int total = 0;

int n;

for( n = 112; n <= 212; ++n) {

total += n;

}

printf("%d\n", total);

User Avatar

Wiki User

16y ago

What else can I help you with?

Continue Learning about Engineering

Write a c program to generate student mark details using union and find total and average and grade?

write a c program to display marks,total,average,grade using union


How do you write a program in qbasic to input 64751315 to sum?

In QBASIC, you can write a simple program to input the number 64751315 and sum its digits as follows: DIM sum AS INTEGER sum = 0 INPUT &quot;Enter a number: &quot;; number FOR i = 1 TO LEN(number) sum = sum + VAL(MID$(number, i, 1)) NEXT PRINT &quot;The sum of the digits is &quot;; sum This program prompts the user to input a number, iterates through each digit, converts it to an integer, and adds it to the total sum, which is then printed out.


How do you write a program to calculate total of a number series 1 to 25 using for statement in java and finally display the total?

To calculate the total of the number series from 1 to 25 in Java using a for loop, you can initialize a variable to hold the total sum, then iterate through the numbers from 1 to 25, adding each number to the total. Here's a simple example: public class SumSeries { public static void main(String[] args) { int total = 0; for (int i = 1; i &lt;= 25; i++) { total += i; } System.out.println(&quot;Total: &quot; + total); } } This program declares an integer variable total, uses a for loop to sum the integers, and finally prints the result.


Write a program that will prompt you to give the number of pods and the number of beans per pod and calculate the total number of beans use C plus plus?

#includeusing namespace std;int main(){int pods,beans;float total;cout>beans;total=pods+beans;cout


Write the program in qbasic and add two numbers?

Cls input "enter two no.s ",a,b sum=a+b print "sum = ";sum end

Related Questions

How can I calculate my cumulative GPA by incorporating my semester GPA?

To calculate your cumulative GPA, you need to add up all your grade points from each semester and divide by the total number of credits. Multiply your semester GPA by the number of credits for that semester, then add up these values for all semesters. Divide this total by the total number of credits to get your cumulative GPA.


How the total builds as each number is added to previous ones is shown by?

The cumulative sum.


How can I figure out my cumulative GPA?

To calculate your cumulative GPA, add up the grade points for all your courses and divide by the total number of credits. Grade points are typically assigned as follows: A4, B3, C2, D1, F0. Multiply the grade points for each course by the number of credits to get the total grade points. Add up all the total grade points and divide by the total number of credits to get your cumulative GPA.


How can I add my semester GPA to my cumulative GPA?

To add your semester GPA to your cumulative GPA, you need to multiply your current cumulative GPA by the total number of credits you have completed so far, then add the product to the product of your semester GPA and the number of credits for the current semester. Finally, divide this sum by the total number of credits you have completed so far plus the number of credits for the current semester.


What is a cumulative frequency?

It is the running total of the number of observations with a value upto and including the current value.


What is cumulative frequency?

Cumulative frequency is the running total of class frequencies.


What is the sum of cumulative frequencies in a distribution?

The sum of cumulative frequencies in a distribution is equal to the total number of observations or data points in that distribution. Cumulative frequency represents the running total of frequencies up to a certain point, so when you sum all cumulative frequencies, it reflects the entirety of the dataset. This sum is particularly useful in understanding the distribution and determining percentiles or quartiles.


How do you calculate cumulative frequency?

To calculate cumulative frequency, you first need to have a frequency distribution table. Start by adding up the frequencies of the first category. Then, for each subsequent category, add the frequency to the cumulative frequency of the previous category. The final cumulative frequency will be the total number of observations in the data set.


How do you calculate your cumulative GPA by incorporating your semester GPA?

To calculate your cumulative GPA, you need to add up all your grade points from each semester and divide by the total number of credits. Multiply your semester GPA by the number of credits for that semester, then add up these values for all semesters and divide by the total number of credits.


What is The cumulative total and kind of living things on Earth is?

The cumulative total of living things on Earth is estimated to be around 8.7 million species, although the actual number could be much higher. These include plants, animals, fungi, and microorganisms.


What does cumulative mean?

Incorporating all data up to the present; That is formed by accumulation of successive additions; Think of it like a running total. If you have totalled up a set of numbers (eg scores), and then add one more number to it, the cumulative score is the combined sum of the previous total plus the additional number added to it.


What is Meaning of cumulative percent?

Suppose you have a set of ordinal values and numbers of occurrences of the values then the number of occurrence as a percentage of the total number of occurrences is the percentage corresponding to that particular ordinal value. The cumulative percent is the sum of the percentages up to and including that ordinal value.