473,398 Members | 2,165 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,398 software developers and data experts.

wrong output

29
i am trying to write a programm with the output
$$$$$$$$
$$$$$$$$
&&&&&&
$$$$$$$
$$$$$$$
&&&&&&

but instead i got
$$$$$$$
&&&&&

can somethere help me out.
thanks
Oct 13 '08 #1
5 1009
sicarie
4,677 Expert Mod 4TB
Sure, can we see the portion of your code where you print these characters out?
Oct 13 '08 #2
locy
29
Sure, can we see the portion of your code where you print these characters out?
Expand|Select|Wrap|Line Numbers
  1.         .............
  2.         ..............
  3.         ............
  4.         if(counter%2 == 0)
  5.          { 
  6.            printf("$");
  7.           }   
  8.         else    
  9.           {
  10.            printf("&");
  11.           } 
  12.        }                        
  13.         printf("\n");          
  14.        }
  15.  
Oct 13 '08 #3
sicarie
4,677 Expert Mod 4TB
Hmmm, could we see the 5 lines before/after that?
Oct 13 '08 #4
JosAH
11,448 Expert 8TB
Better make that line #4 something like this:

Expand|Select|Wrap|Line Numbers
  1. if (counter%3 != 2) ...
  2.  
kind regards,

Jos
Oct 13 '08 #5
locy
29
Better make that line #4 something like this:

Expand|Select|Wrap|Line Numbers
  1. if (counter%3 != 2) ...
  2.  
kind regards,

Jos

thanks,
it work..........
Oct 16 '08 #6

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

Similar topics

5
by: Jepsensen | last post by:
Dear Everybody. I got a problem with my cpp code. I'm trying to calculate a very simple Discrete Cosine Transform (DCT), but my c++ code seams to calculate a wrong result. I have just started...
1
by: Qiangning Hong | last post by:
I decide to seperate my data collection routine from my data analysis and storage program to a seperate process, so I try to use the new subprocess model in Python 2.4. The main program spawns...
28
by: wwj | last post by:
void main() { char* p="Hello"; printf("%s",p); *p='w'; printf("%s",p); }
3
by: mosimu | last post by:
I am using Visual C++ .NET 2003. I have discovered the following problem and did not find any other mention of it on the forums. This code was being run in Debug mode, console application, with...
0
by: Jim Andersen | last post by:
I am using Microsoft.ApplicationBlocks.Data (v 2.0.0.0). I have this parameter array I pass to a stored procedure. The last one is an output parameter. So I did this: Line 1: arParms(8) = New...
16
by: msundaram.visvanathan | last post by:
Hi, i tried to write this small code in C which would: Input :a b c d Output:abcd code: #include<stdio.h>
0
by: arlie_maija | last post by:
Hey - I'm writing a control that contains a DataGrid, and I'm unable to get the update event to fire. When I click the update link, the edit event fires. heres the details... my control...
5
by: Simon Brooke | last post by:
This is supposed to be a very simple XSL stylesheet to strip styling information out of HTML documents - it could not be more basic. And yet, it doesn't work. I'm obviously getting something very...
12
by: broli | last post by:
#include<stdio.h> #include<stdlib.h> struct point { double x, y, z;
27
by: Dave | last post by:
I'm having a hard time tying to build gcc 4.3.1 on Solaris using the GNU compilers. I then decided to try to use Sun's compiler. The Sun Studio 12 compiler reports the following code, which is in...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
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...
0
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...
0
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.