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

  Program that incorporates these two functions

Write the program that incorporates these two functions, as described. You will notice that the two functions have very similar statements, so you are doing some repetitive C++ code.

  First display the smallest volume and then the largest volum

first display the smallest volume and then the largest volume.

  C string and two int reference parameters

Write a complete function, not an entire program, that has a C string and two int reference parameters (call them a and b), returning nothing.

  In competitive tournament

In competitive tournaments, it is common for all the players or teams to play in a series of matches in order to determine a single winner of the entire tournament. However, a number of different tournament formats exist. Here, we will concern our..

  Write a program that reads numbers

Write a C++ program that reads N positive numbers from the keyboard, calculates and shows the smallest number of all numbers

  Unit conversions

Unit Conversions. The following problem generate tables of unit conversions. Include a table heading and column headings for the tables. Choose the number of decimal place based on the values to be printed.

  Contains a design with a while loop

This problem contains a design with a while loop. Assume that sum references a doubleword in the data segment and that count is in the ECX register. Give a fragment of 80x86 assembly code that implements the design.

  Approximately normally distributed

Write a program MakeFile.cpp that creates a file random.dat that contains 200 random numbers where each number is the sum of 12 random values rand( )%9. When we add a sufficient number of uniformly distributed numbers the result is approximately n..

  Function that accepts a pointer to a c-string

Write a function that accepts a pointer to a C-string as an argument and returns the number of words contained in the string. Also have it display the average number of letters in each word.

  T computes and posters the probabilities of two people

Write a C program that computes and posters the probabilities of two people in a group who are born in the same day. The probability of two people being born in the same day of the year, for a group of  n people, is given by the following formula:

  50 element array of integers with random numbers

write a java code to instantiate and initialize a 50 element array of integers with random numbers in the range of 45 through 256 inclusive.

  C program to solve the quadratic equation of rocket launch

Write a C program to solve the quadratic equation of rocket launch by computing the roots (t1 and t2) of that quadratic equation: gt2 + vt + l = 0 (or) for simplicity ax2 + bx + c = 0. Get the values of g, v, and l from the user. The program should d..

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