Write a program in C++ to print the following series: 7,77,777,7777,77777
By using " for loop", " do-while loop" or " while loop".
Answers
Answered by
0
Answer:
Write a program in C++ to print the following series: 7,77,777,7777,77777
Answered by
1
Answer:
#include <stdio.h>
using namespace std;
int main()
{
int outerloop = 5;
int count = 1;
while(outerloop--)
{
for(int i=0;i<count;i++)
printf("%d",7);
printf(",");
count++;
}
}
Explanation:
Similar questions