Thursday, January 22, 2015

c++ sample codes.


#include "stdafx.h"
#include <iostream>
using namespace std;
int main() {

for(int x= 1;x<=5;x++) {
for(int z=1;z<=x;z++) {
cout<<" ";
}
for(int y=1;y<=5;y++) {
cout<<"*";
}
cout<<"\n";
}
cin.get();
cin.get();
return 0;
}



No comments:

Post a Comment

Designed By Seo Blogger Templates Published.. Blogger Templates