write a program that input four digit number and find how
many 7 that number contains

Answer Posted / gundaraj

void main()
{
int a[4],i,count=0;
cout<<"enter 4 digit number";
for(i=0;i<=3;i++)
{
cin>>a[i];
if(a[i]==7)
count++;
}
cout<<"The number of 7's are "<<count;
}

Is This Answer Correct ?    1 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain stl.

911


What is a standard template library (stl)? What are the various types of stl containers?

679


What is the stl, standard template library?

602


What are stl algorithms?

635


In what scenario does the Logical file and Physical file being used?

2334






Name the different types of stl containers.

701


Can we use stl in coding interviews?

1292


What is a standard template library (stl)?

655


What is stl stack?

673


Write a C/C++ program that connects to a MySQL server and checks if the InnoDB plug-in is installed on it. If so, your program should print the total number of disk writes by MySQL.

1985


How stl is different from the c++ standard library?

654


Why should a c++ programmer be interested in stl?

649


sir please send me bpcl previous question papers

1968


what is template and type convertion

2004


What are the symptoms of stl?

613