Tuesday, 5 January 2016

Print ALLAH word in C++

Print ALLAH word in C++

ALLAH words program in C, Cplusplus, write a program in c which print ALLAH words .
Structure of the Problem Requirements 
This Program will print ALLAH words in C++. The words is print through the logic and not hard coded. 
Source Code 
#include<iostream>
using namespace std;
int main()
{
 for(int a=1;a<11;a++)
 {
  for(int b=1;b<17;b++)
  {
   if(a==3 && b==16 || a==3 && b==10 || a==3 && b==12 || a==3 && b==14 || a==4 && b==9 || a==4 && b==10 || a==4 && b==12 || a==4 && b==14 || a==4 && b==16 || a==5 && b==8 || a==5 && b==10 || a==5 && b==12 || a==5 && b==14 || a==5 && b==16 || a==6 && b==8 || a==6 && b==9 || a==6 && b==10 || a==6 && b==12 || a==6 && b==14 || a==6 && b==16 || a==7 && b==10 || a==7 && b==12 || a==7 && b==
   14 || a==7 && b==16 || a==8 && b==10 || a==8 && b==11 || a==8 && b==12 || a==8 && b==13 || a==8 && b==14 || a==8 && b==16 || a==0 && b==12 || a==1 && b==12 || a==2 && b==11 || a==2 && b==12 || a==2 && b==13)
{
    cout<<"*";
   }
   else
   {
    cout<<" ";
   }
  }
  cout<<endl;
 }
}
Output of the Program
How to Print ALLAH words in C++


No comments:

Post a Comment