Counts the number of numbers between 150 and 200

Assignment Help C/C++ Programming
Reference no: EM13168087

create a program that counts the number of numbers between 150 and 200. This is what I have so far, but it's not working. It is an array of 500 number, I did not include the array because of obvious reasons. 

#include <stdio.h>
int main()
{
int i=0;
int sum;
float a[]={.....}

for (i=0;i>150&& i<200;i++)
        sum=i;
printf("There are %d numbers between 150 and 200\n", sum);

return 0;

 

 

Reference no: EM13168087

Questions Cloud

Electrical energy can be used to separate water into oxygen : Electrical energy can be used to separate water into oxygen gas and hydrogen gas. In one such experiment,
Implement a class person with two fields name and age : Implement a class Person with two fields name and age, and a class Car with three fields
Normally this representation has a fixed size : Most programming languages have a built-in integer data type. Normally this representation has a fixed size, thus placing a limit on how large a value can be stored in an integer variable.
Why were the sections of the communication : Why were the sections of the Communications Decency Act (CDA) designed to protect children from concerns about Internet pornography so controversial?
Counts the number of numbers between 150 and 200 : create a program that counts the number of numbers between 150 and 200. This is what I have so far, but it's not working. It is an array of 500 number, I did not include the array because of obvious reasons.
Explain what is the molar mass of a sample of gas : When hcl and nahco3 are mixed together, a chemical reaction takes place in which a gas is one of the products. What is the molar mass of a sample of gas
Sodium azide are needed to provide sufficient nitrogen gas : How many grams of sodium azide are needed to provide sufficient nitrogen gas to fill a 35.0x35.0x25.0 cm bag to a pressure of 1.20 atm at 26 degress C.
State the air pressure in the tires of an automobile : The air pressure in the tires of an automobile is adjusted to 37 psi in SanDiego, where the air temp is 68F. The air in the tires is at the same temp as the atmosphere
Explain what is the volume of the balloon when it bursts : If the atmospheric pressure at 30 km is 28.0 torr and the temp is -48 C, what is the volume of the balloon when it bursts?

Reviews

Write a Review

C/C++ Programming Questions & Answers

  A used car dealership maintains an inventory

Submit the completed program (all 4 parts) including all class definitions/implementations in a single .cpp source file (i.e., do not construct separate files for class headers and implementation).

  It would be cool if a device was actually part

Have you ever been low on cash and couldn't go beyond a certain dollar limit when shopping? You sort of need a calculator in your head. It would be cool if a device was actually part of the cart and as you add an item into the cart it would increm..

  Calculate the total of a purchase from a farmer''s market

You will develop a program that can calculate the total of a purchase from a farmer's market that sells apples, bananas, and oranges. At this particular market, apples are $1.99/lb., bananas are $0.99/lb., and oranges are $1.50/lb. Users should be..

  Include a main function that will solicit

Include a main function that will solicit a DNA sequence string from the user, call the genes function to obtain all the genes in the sequence and print each one on the console display

  Write a program that reads an array with wind-tunnel test

write a program that reads an array with wind-tunnel test data then allowss the user to enter a flight-path angle. If the angle is within the bounds of the data set, the program should then use linear inteerpolation to compute the corresponding coeff..

  Dealerships are awarded the rebate

Dealerships are awarded the rebate on a quarter-by-quarter basis, only for quarters where their actual sales exceeded expected volumes for that quarter. Expected sales volumes for each quarter are as follows:

  Recognition of the problem by the hsbc

What problem did the HSBC face in this case? What people, technology, and the organization factors were responsible for problem? Did HSBC management correctly recognize the problem?

  Write a program that contains a main function

Write a program that contains a main function and three other functions that will return various attribute information about an array of floating point

  Prepare an accounting for a dorm''s kitchen

The "purpose" of the program is to prepare an accounting (database) for e.g. a dorm's kitchen, to keep track of the consumption of beer for each room.

  Before each sort, write psudo-code

Ceate a single cpp ?le (FILE=MAIN2.cpp) containing all three elementry sorts(bubble, insertion, selection). Before each sort, write psudo-code and invarient analysis of the sort in block comment style. Add the code from 3.). Generate a list of 100..

  The stack-based routing scheme

the stack-based routing scheme you are to have a stack of maze locations.

  Two for loops that will calculate the sum of all even number

Write a program using two for loops that will calculate the sum of all even numbers between 2 and 100,

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd