0% found this document useful (0 votes)
207 views1 page

Answer On Question# 52832, Programming, C++

The document contains an algorithm and flowchart to read 10 integers from keyboard between 0-100, count how many are larger than 50, and display the count. The C++ program uses a for loop to input 10 numbers, checks the range, increments a counter if >50, and outputs the final count of numbers larger than 50.

Uploaded by

gebriye
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
207 views1 page

Answer On Question# 52832, Programming, C++

The document contains an algorithm and flowchart to read 10 integers from keyboard between 0-100, count how many are larger than 50, and display the count. The C++ program uses a for loop to input 10 numbers, checks the range, increments a counter if >50, and outputs the final count of numbers larger than 50.

Uploaded by

gebriye
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Answer on Question# 52832, Programming, C++

Write an algorithm and draw flowchart that read 10 integers from the keyboard in the range 0-
100, and count how many of them are larger than 50, and display this result.
Answer:

FlowChart:
Start

Number=0;

i=1,10

Output
X=-1
Number

X<0 or X>100 End

Input x
X>50

Number=Number+1;

Program:
#include <iostream>
using namespace std;
int main(){
int x;
int number=0;
int i;
for(i=0;i<10;i++)
{
x=-5;
while((x<0)||(x>100))
{
cout<<"Input number in range (0-100): ";
cin>>x;
}
if(x>50)
number++;
}
cout<<"From 10 numbers "<<number<<" larger than 50";
return 0;
}
http://www.AssignmentExpert.com/

You might also like