<u>C++ program to print the digit without a comma </u>
#include<iostream>
#include<string>
using namespace std;
void commaremoval(string num) /*Defining function commaremoval with parameter num of string type*/
{
string s=num;
for(int i=0; i< s.length();i++)
{
if(s[i]!=',')
/*Checking whether the string doesn't contain ' ,' */
cout<<s[i]; //Printing Output without comma
}
}
//driver function
int main()
{
string num;
cout<<"Enter a digit between 1,000 and 999,999:"<<endl;
/*taking input from user*/
cin>>num;
commaremoval(num);
//calling function
return 0;
}
<u>Output</u>
Enter a digit between 1,000 and 999,999: 22,343
22343
Answer:
1.The high level language are closer to human language the instruction written in this language are similar to English like words and statements
2. It is easy to understand
3. It is easy to modify
4. User friendly
5. Standarized syntax
6. Deep hardware knowledge is not required for using this.
7. Mechine indepence
8. In this language the error are easily located.
9. The program written in this language are called source code.
10. The program written in this language are shorter in size than low level language.
Most likely bring it to your managers attention and and have him contact an OSHA employee.
You can just look up "python ide online" on google and paste this code:
n = -1
count = 0
while n < 0:
n = int(input("We're checking to see if a number is prime or not! Enter a positive number: "))
if n % 2 == 0:
if n == 2:
print("{} is a prime number".format(n))
else:
print("{} is not a prime number".format(n))
else:
for x in range(n, 1, -1):
if n % x == 0:
count += 1
if count > 1 or n == 1:
print("{} is not a prime number".format(n))
else:
print("{} is a prime number".format(n))
I've written some code that checks to see if a number entered by the user is a prime number or not.
Sorry, but I'm not too good with pseudocode plans and all that. I hope this helps.
Answer:
The first two are the best ones I see here, because I play them. Not sure how else to say that. Please make sure to also use brainly for school, though. Thanks!