A In situations involving a fixedcount condition the for sta
A) In situations involving a fixed-count condition, the for statement is easier to use than its while statement equivalent.
B) The break statement causes an immediate exit from the for loop.
C) It is not possible to use the initializing list of a for statement to both declare and initialize the counter variable.
Solution
1)
#include <iostream>
using namespace std;
int main()
{
char a;
while(a<=10)
{
cout<<\"Software\"<<endl;
a++;
}
}
2)
#include<iostream>
#include<iomanip>
using namespace std;
int main()
{
int number=0;
cout<<\"odd numbers list( 1 to 49):\";
for(number=1;number<=49;number+=2)
{
cout<< number<<endl;
}
system(\"pause\");
return 0;
}
3)
#include <iostream>
#include <iomanip>
using namespace std;
int main()
{
// Program to print every five numbers from zero to 100
for ( int number = 0; number <= 100; number += 5 )
{
cout << setw(5) << number;
if ( number == 50 ) cout << endl;
}
cout << endl << endl;
return EXIT_SUCCESS;
}

