473,699 Members | 2,202 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

I am trying to run a program on C and I'm not sure how to start the for loops.

2 New Member
The output should look like this:

This program will print a character diamond.
Enter a character: 6
Enter an odd number at least 1 but less than 40: 15
6
67876
6789:9876
6789:;<;:9876
6789:;<=>=<;:98 76
6789:;<=>?@?>=< ;:9876
6789:;<=>?@ABA@ ?>=<;:9876
6789:;<=>?@ABCD CBA@?>=<;:9876
Sep 28 '16 #1
3 1065
cameronmcisaac
2 New Member
The output is suppose to look more like a pyramid and not a right triangle.
Sep 28 '16 #2
weaknessforcats
9,208 Recognized Expert Moderator Expert
Draw it again. You can use periods as spaces so I can see what you want to do.
Sep 28 '16 #3
donbock
2,426 Recognized Expert Top Contributor
You should draw the desired output inside Code tags so that Courier font is used (all characters are the same width).
Sep 28 '16 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

2
3502
by: Dave Reed | last post by:
I seem to remeber reading somewhere there was a statement you could put in your python program to stop its execution and start the interactive interpreter at that point (and then you could change the value of some variables and continue executing). Am I having delusions or is there a way to do this? Thanks, Dave
1
2264
by: RWC | last post by:
Hello, I have just converted a database from A97 to A2K2. I had a procedure for changing start up properties that worked really well. For some reason, they don't work in A2K2 and I'm having a tough time finding out what the "replacement values" are. These are the items I'm trying to change; ChangeProperty "AllowSpecialKeys", dbBoolean, True ChangeProperty "AllowByPassKey", dbBoolean, True ChangeProperty "StartUpShowDBWindow",...
1
5346
by: cashdeskmac | last post by:
I want to offer uswers the chance to add my program to their startup when they install it. I don't mean the Start Up menu, but instead to have it listed in msconfig and start up automatically when the computer does. Can anyone help ?
3
1478
by: JN | last post by:
Hello, I am trying to write a program or service that will run in the background and wait for a particular program to start, when it does I want something else to occur such as a message box. I am not sure how to do the waiting game (sleep is no good, neither is a loop). Any help is appreciated. JN
5
2459
Reika
by: Reika | last post by:
Hello, I need help understanding some things in programming. I'm taking a high school level programming course, however my teacher is less than helpful in explaining or even understanding the assignments he gives us himself. I'm unsure what version of Codewarrior we use, but its Metroworks Codewarrior, Windows not mac, and this is in C++. My first problem is understanding how to use nested for loops in order to display a (crooked) diamond...
6
3481
by: gopython | last post by:
Hi all, OS: Windows XP C++: Microsoft Visual C++ 2005 I am wondering if it is possible to kill the C++ program after calling another program (i.e. .bat). I did a simple test and check the "Windows Task Manager". After the exe run the .bat the exe is still there until the .bat finished running. Is that possible to kill the .exe after the .bat is called. // Filename:test.cpp #include <iostream>
3
1393
by: aplata | last post by:
I am trying to understand the following code: my @arr1=(5,3,2,1,4); my $i=0; my $j=0; $tmpnum for($i=0;$i<@arr1;$i++) { for($j=0;$j<@arr1;$j++) { if($arr1<$arr1) { $tmpnum=$arr1;
1
1264
by: William Chavula | last post by:
void basic() { cout<<"---FOLLOW THESE STEPS TO DIAGNOSE INTERNET PROBLEMS---\n\n"; cout<<"---STEP 1---\n\n"; cout<<"Run your mobile partner software\n\n"; cout<<"---STEP 2---\n\n"; cout<<"Click on TOOLS in the menu bar\n\n"; cout<<"---STEP 3---\n\n"; cout<<"In the tools menu click on PROFILE MANAGEMENT\n\n";
0
8628
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9054
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8943
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7785
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6550
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5884
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4391
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4637
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
2016
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.