World or Life
Home
Facebook
Twitter
Tuesday, 16 April 2013
Tanda X Angka C++
#include <iostream.h>
main()
{
int a, b, c;
cout<<"input = ";
cin>>a;
for (b=1;b<=a;b++)
{
for (c=1;c<=a;c++)
{
if (c==b||c==a-(b-1))
cout<<c;
else
cout<<" ";}
cout<<endl;
}}
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment