EngineersGarage

  • Engineers Garage Main Site
  • Visit our active EE Forums
    • EDABoard.com
    • Electro-Tech-Online
  • Projects & Tutorials
    • Circuits
    • Electronic Projects
    • Tutorials
    • Components
  • Digi-Key Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
  • Advertise
You are here: Home / Topics / C-Program for rectangular pyramid..code required

C-Program for rectangular pyramid..code required

|

Miscellaneous › Others › C-Program for rectangular pyramid..code required

  • This topic has 1 reply, 2 voices, and was last updated 12 years, 1 month ago by doraemon.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • May 12, 2013 at 3:49 am #2398
    Mrityunjoy
    Participant

    hello,

    i’m a begineer in learning c.i have completed “nested loop” and “arrays”. please help me to make the following structure with comments in program.

     

       a b b b

       b a b b

       b b a b

       b b b a

     

    thank you in advance.

    May 14, 2013 at 12:38 pm #9746
    doraemon
    Participant

    Here loop to generate pattern

    for(i=0;i<4;i++)
    {
    for(j=0;j<4;j++)
    {
    if(i==j)
    {
    printf(“a”);
    }
    else
    {
    printf(“b”);
    }
    }
    printf(“n”);
    }

  • Author
    Posts
Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.
Log In

RSS Recent Posts

  • Parts required for a personal project June 15, 2025
  • Curved lines in PCB design June 15, 2025
  • Wideband matching an electrically short bowtie antenna; 50 ohm, 434 MHz June 15, 2025
  • using a RTC in SF basic June 15, 2025
  • PIC KIT 3 not able to program dsPIC June 15, 2025

Stay Up To Date

Newsletter Signup
EngineersGarage

Copyright © 2025 WTWH Media LLC. All Rights Reserved. The material on this site may not be reproduced, distributed, transmitted, cached or otherwise used, except with the prior written permission of WTWH Media
Privacy Policy | Advertising | About Us

Search Engineers Garage

  • Engineers Garage Main Site
  • Visit our active EE Forums
    • EDABoard.com
    • Electro-Tech-Online
  • Projects & Tutorials
    • Circuits
    • Electronic Projects
    • Tutorials
    • Components
  • Digi-Key Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
  • Advertise