My C language learning journey

in #art4 years ago

未标题-1.jpg
I want to write a code to print rhombus with use C program language.This code would used six for statements.The previous three for statements be used to print the upper five lines.After three for statements be used to print the following four lines.code as follows:

#include"stdio.h"
int main(void){

int a,b;
for(a=1;a<=5;a++)
{
    for(b=1;b<=5-a;b++)
        printf(" ");
    for(b=1;b<=2*a-1;b++)
        printf("*");
        printf("\n");
}
for(a=1;a<=4;a++)
{
    for(b=1;b<=a;b++)
        printf(" ");
    for(b=2*a-1;b<=7;b++)
        printf("*");
        printf("\n");
}
    return 0;

}

捕获.PNG

Sort:  

Congratulations @sky-999! You have completed the following achievement on the Steem blockchain and have been rewarded with new badge(s) :

You published your First Post
You got a First Vote

You can view your badges on your Steem Board and compare to others on the Steem Ranking
If you no longer want to receive notifications, reply to this comment with the word STOP

Do not miss the last post from @steemitboard:

SteemitBoard Ranking update - A better rich list comparator
Vote for @Steemitboard as a witness to get one more award and increased upvotes!

Welcome to steemit @sky-999.

Welcome the new steemians. Have a great day!

Welcome sky-999!
eSteem is mobile and desktop application that improves your experience on Steem.

Download Android and iOS apps. Surfer Desktop application that helps you to gain new followers and stay connected with your friends, unique features - notifications, bookmarks, favorites, drafts, and more.
We reward our users with encouragement upvotes as well as ESTM token.
Learn more: https://esteem.app
Join our discord: https://discord.me/esteem

Welcome to Steem sky-999! Partiko is officially the fastest and most popular mobile app for Steem. Unlike other Steem apps, we take 0% cut of your earnings! You can also be rewarded with Partiko Points while using Partiko and exchange Partiko Points for upvotes!

Partiko for Android can be downloaded here on Google Play and the iOS version is available here on the App Store.

If you have more questions, feel free to join our Discord channel and ask @crypto.talk, we're always here to help!

Thank you so much for your interest!

Hi @sky-999,

The TravelFeed.io team manually reviewed your post and marked it as not travel-related.

Since it violates our policies, your post has been removed from TravelFeed.io.

To learn more about our policies, you may check them out here. Please contact us through our Discord if you wish to appeal.

love the code

Hey sky-999! If you would like to make your personal feed contain the top trending media and talking points of the whole internet, consider following @coffeebreak and @topicstoday accounts - And welcome to Steem!

Coin Marketplace

STEEM 0.35
TRX 0.12
JST 0.040
BTC 70753.86
ETH 3589.34
USDT 1.00
SBD 4.75