Friday, 2 May 2014

Write a program that prints digit from 1 to 10 but 3 and 7 shouldn’t be printed.

Leave a Comment


 write a program that prints digit from 1 to 10 but 3 and 7 shouldn’t be printed.

#include <iostream>                     
#include <conio.h>

using namespace std;

int main()
{
 int num;
 for (num=1;num<=10;num++)
 {
   if (num==3 || num==7)
        continue;
   cout<<"\n"<<num;
 }
 getch();
}
 


 
If You Enjoyed This, Take 5 Seconds To Share It