10-09-2006
heres what i have.
#include <stdio.h>
int main()
{
int r, rs, astr;
rs=2; /*i am hardcoding the rs value here*/
if(rs/2%0){
/*here i want to have it right aligned*/
for(r=1, r<=rs, r++){
for(astr=1, astr<=rs, astr++)
printf("*");}
else
/*here i want to have it left aligned*/
for(r=1, r<=rs, r++){
for(astr=1, astr<=rs, astr++)
printf("*");}
}
return EXIT_SUCCESS;
}
10 More Discussions You Might Find Interesting
1. Programming
Hi, there. Everyone had a great Thanksgiving?
I have a slice format problem when I am using vim to edit c++ source code. I don't know how to discribe the problem exactly. You see, usually when I use the command "vi hello.cpp" to write a code, it will have the format like this:
#include... (4 Replies)
Discussion started by: HOUSCOUS
4 Replies
2. UNIX for Dummies Questions & Answers
Hello guyz..
just want to know whether my doubt can be solve or not..maybe it
my company using yyyymmddxx for serial no format..and it cause problems..
first, my adjustments for moving n deleting domain name exceeded xxx per day, and it will cause and effect the yyyymmdd digits.
can... (6 Replies)
Discussion started by: unknown2205
6 Replies
3. Shell Programming and Scripting
studentNo=$1
tmp=/tmp/acc2courses$ID.$$
grep -w "$studentNo" CSE1001 >/dev/null 2>&1
&& echo CSE1001 >>$tmp
grep -w "$studentNo" CSE1002 >/dev/null 2>&1
&& echo CSE1002 >>$tmp
grep -w "$studentNo" CSE9001 >/dev/null 2>&1
&& echo CSE9001 >>$tmp
This is my code,
The output in tmp file... (10 Replies)
Discussion started by: ccwq
10 Replies
4. Shell Programming and Scripting
i need to send 2 diff mail in a single script:Below the script
#!/bin/ksh
echo "enter the number"
read num
if
then
mail -s "test" unix@yahoo.com
mail -s "test" 9886767000@nma.vodafone.in,9916138003@nma.vodafone.in
else
echo "test again"
fi... (5 Replies)
Discussion started by: ali560045
5 Replies
5. Shell Programming and Scripting
Someone can help for the following fromat change can done by script?
i.e. insert the perivous colurm's first variable if below line don't have the varaible start from AXXX....
From
A123,B123,C123
B123,C123
A234,B234,C234
A345,B345,C345
B345,C34
B345,C345
B345,C345
A456,B456,C456
... (2 Replies)
Discussion started by: bleach8578
2 Replies
6. Shell Programming and Scripting
if ( $opt{ww} ) {
my $week = $opt{ww} ? $opt{ww} : $lot_list->{cal}->getWW();
print "\nStarting at $week\n";
while ( $week > 200430 ) {
print localtime() . ": Working on $week\n";
my ($start,$end) = $lot_list->getWeekDates($week);
print localtime() . ":... (3 Replies)
Discussion started by: vahnski
3 Replies
7. Shell Programming and Scripting
can any one know that how can i get perfect format of phone number
my function is
phone_number=`echo $name_number | awk '{print $NF}'`
check=`echo $phone_number | egrep -c "--"`
i get the format but if i need perfect format like xxx-xxx-xxxx. if i enter not in this format it still... (1 Reply)
Discussion started by: tarunsavalia
1 Replies
8. Shell Programming and Scripting
Hello Everyone!
I hope you can help me!!
I have this little problem:
I executed oracle query and the output of the result are in a text file called "DATAFILE.txt", and the value of file is: 97.37
Well, the script compare the result in text file with a condition:
... (5 Replies)
Discussion started by: bobbasystem
5 Replies
9. Shell Programming and Scripting
Hi
I have a shell scribt with some numbers in exponential format, for example, "1.23456789E +01" Now I would like to bring these numbers into a format without the E. Can someone help me
Thanks
Flo
---------- Post updated at 10:07 AM ---------- Previous update was at 09:14 AM... (1 Reply)
Discussion started by: sbfly
1 Replies
10. Shell Programming and Scripting
I have written a code in Linux environment which compares two dates and print "correct" if 1st date is less than 2nd date. But when I'm running the same code in SunOS environment, "date -d is an illegal format" is the error it is throwing. How different should my code be so that it executes well in... (18 Replies)
Discussion started by: Chandan_Bose
18 Replies