Structure of the Problem Requirements
This Program is substantially added to understanding of logic building and improved programming skills. The purpose of this piece of code is to learn logic building . Instead of going with hard coding just try to do it with little bit change in logic. With this logic the program will display the alphabet A.Source Code
#include <iostream>
#include <iomanip>
using namespace std;
void display_A();
int main() {
cout<<"\t \t \t LEP Tutorials \n \n \n";
display_A();
return 0;
}
void display_A(){
int j=1;
for(int i=13;i>0;i--){
if(i==6){
j++;
cout<< setw(i-1)<<"";
for(int k=0;k<j;k++){
cout<<"*";
}
cout<<"\n";
j++;
}else{
j++;
cout<< setw(i)<<"*"<<setw(j)<<"*\n";
j++;
}
}
}
Output of the Program
Asad Niazi is Software Engineer , Programmer, Web Developers and a young mentor of Tech Solutions Desk and Blogging Solutions . Asad Love to writes about Technology, Programming, Blogging and make money online.
nice
ReplyDelete