Question about Computers & Internet

1 Answer

I want to align printf()'s text in center. - Computers & Internet

Posted by on

1 Answer

  • Level 2:

    An expert who has achieved level 2 by getting 100 points

    Hot-Shot:

    An expert who has answered 20 questions.

    Corporal:

    An expert that hasĀ over 10 points.

    Mayor:

    An expert whose answer gotĀ voted for 2 times.

  • Expert
  • 55 Answers

Printf("Color %s, number1 %d, number2 %05d, hex %x, float %5.2f, unsigned value %u.\n",
"red", 123456, 89, 255, 3.14, 250);
will print the following line (including new-line character, \n):
Color red, number1 123456, number2 00089, hex ff, float 3.14, unsigned value 250.

The printf function returns the number of characters printed, or a negative value if an output error occurs.

for further inf u can see.

http://en.wikipedia.org/wiki/Printf

Posted on Nov 26, 2008

1 Suggested Answer

6ya6ya
  • 2 Answers

SOURCE: I have freestanding Series 8 dishwasher. Lately during the filling cycle water hammer is occurring. How can this be resolved

Hi,
a 6ya expert can help you resolve that issue over the phone in a minute or two.
best thing about this new service is that you are never placed on hold and get to talk to real repairmen in the US.
the service is completely free and covers almost anything you can think of (from cars to computers, handyman, and even drones).
click here to download the app (for users in the US for now) and get all the help you need.
goodluck!

Posted on Jan 02, 2017

Add Your Answer

Uploading: 0%

my-video-file.mp4

Complete. Click "Add" to insert your video. Add

×

Loading...
Loading...

Related Questions:

1 Answer

Hello... i need a program in c...... a calendar where you can save on a specific date a reminder...


#include <stdio.h>
#include <conio.h>
#include <math.h>
#include <iostream.h>
#include <fstream.h>


int getdaycode(int year)
{
return(year+(year-1)/4-(year-1)/100+(year-1)/400)%7;
}

int bool getleapcode(int year)
{
return year%4==0&&year%100!=0''year%400==0;
}


main()
{
clrscr();
int choice,month,days,day,daycode;
printf("\t\t\tSCHEDULER-CALENDAR PROGRAM\n\n\n");
printf("Please choosefrom the Menu:\n");
printf("\t1- Calendar Dislplay\n");
printf("\t2- Schedule Editor\n");
printf("\nChoice: ");
scanf("%d",&choice);

if(choice==1)
{
clrscr();
int year;
printf("\tCalendar Display\n\n");
printf("Type the YEAR to be Displayed: ");
scanf("%d",&year);
printf("\nYear = %d",year);

bool leapcode;

daycode=getdaycode(year);
leapcode=getleapcode(year);


for(month=1;month<=12;month++)
{
switch(month)
{
case 1:
{
printf("\nJanuary");
days=31;
}
break;

case 2:
{
printf("\n\nFebruary");
if(leapcode)
{
days=29;
}
else
{
days=28;
}
}
break;

case 3:
{
printf("\n\nMarch");
days=31;
}
break;

case 4:
{
printf("\n\nApril");
days=30;
}
break;

case 5:
{
printf("\n\nMay");
days=31;
}
break;

case 6:
{
printf("\n\nJune");
days=30;
}
break;

case 7:
{
printf("\n\nJuly");
days=31;
}
break;

case 8:
{
printf("\n\nAugust");
days=30;
}
break;

case 9:
{
printf("\n\nSeptember");
days=31;
}
break;

case 10:
{
printf("\n\nOctober");
days=30;
}
break;

case 11:
{
printf("\n\nNovember");
days=31;
}
break;

case 12:
{
printf("\n\nDecember");
days=30;
}
break;
}


printf("\n\nSun Mon Tue Wed Thu Fri Sat\n");

for(day=1;day<=daycode*5;day++)
{
printf(" ");
}
for(day=1;day<=days;day++)
{
printf(" %d ",day);

if((day+daycode)%7>0)
{
printf(" ");
}
daycode=(daycode+days)%7;
}

}



}
if(choice==2)
{
printf("Schedule Editor\n\n");
FILE *fptr1;
char filename1[]="sched.txt";
int reval=SUCCESS;

if((fptr1==fopen(filename1,"w"))
{
printf("File cannot be opened\n");
reval=FAIL;
}
else
{
CharReadWrite(fptr1);
fclose(fptr1);
}


int

getch();
return 0;
}

Sep 07, 2011 | Computers & Internet

1 Answer

# include <stdio.h> output ...


What is your question? The above code is written in C not Basic language.

Aug 10, 2010 | Microsoft Visual Basic 6.0 for PC

1 Answer

How to play the text animation with out clicking


AVI video file of animation
To create this animtion, follow these steps:
  1. Insert a text box from the Drawing toolbar (in PowerPoint 2007, go to Insert tab> Text Box), and type your text. Center justify itthe text by clicking Center on the Formatting toolbar. (In PowerPoint 2007, right-click the text box and choose Center from the mini toolbar.)
  2. Click the text box's outline and copy it to the Clipboard. Paste it two times onto the slide.
  3. Drag the three text boxes apart from each other. Eventually, you'll place them on top of each other, but it's much easier to select them when they're separated. Notice that I have a plain white slide and one word.
  4. Change the properties of the text to create variations. I used 96, 72, and 48 point text, with light gray, dark gray, and black colors. Of course, if you want a different effect, you can do something different.
pptip_text_anim-2.jpg
  1. Choose Slide Show > Custom Animation (in PowerPoint 2007, Animations tab> Custom Animation) to display the Custom Animation task pane.
  2. Select the first text box and choose Add Effect> Entrance> Fade. (If you don't see the Fade animation, click More Effects to find it.) Set the Speed to fast. Leave the Start as On Click (the default).
  3. Select the second text box and choose Add Effect> Entrance> Fade. Again set the Speed to fast, but this time set the Start to After Previous.
  4. As soon as the second text box comes in, you want the first one to fade out. So select the first text box again, and choose Add Effect> Exit> Fade. (You may need to choose More Effects to find it.) Set the Speed to Very Fast and the Start to After Previous. (I discovered by trial and error that I wanted the Speed set to Very Fast; otherwise, you wait too long for the third text box to come in.)
  5. Next, you want the third text box to fade in so select it and choose Add Effect> Entrance> Fade. Set the Start to After Previous and the Speed to Very Fast.
  6. Finally, you want the second text box to fade out, leaving just the third text box. Select it, and choose Add Effect> Exit> Fade. Set the Start to After Previous and the Speed to Fast.
Note: You can always change the order of your animations by selecting an item in the Custom Animation task pane and dragging it to a new location or using the Re-order buttons at the bottom.
  1. Save your work and test the animation to see what it looks like. Either go into slide show view or click the Play button in the task pane.
  2. To center the three text boxes on top of each other, select all three text boxes. From the Draw toolbar, choose Draw> Align or Distribute> Relative to Slide. (In PowerPoint 2007, choose Format tab> Arrange group> Align drop-down list> Align to Slide.)
  3. Now choose Draw> Align or Distribute> Align Center. (In PowerPoint 2007, choose Format tab> Arrange group> Align drop-down list> Align Center.)
  4. Choose Draw> Align or Distribute> Align Middle. (In PowerPoint 2007, choose Format tab> Arrange group> Align drop-down list> Align Middle.)
Save and try out your animation!
Fade in variations of text, one on top of the other plus magnify
You can add another animation to your objects to increase the intensity of the animation. For example, try adding a Magnify entrance effect to all three text boxes. Set the speed the same as the Fade In animation and place the animation in the task pane right after the Fade In. Set the Start to With Previous. You can see how it looks.
AVI video of both animations
Typewriter text
You can make text appear letter by letter; to add to the effect, you can add a typewriter sound. You can see the animation here. Sorry, I couldn't include the sound.
AVI video of typewriter text.
Follow these steps:
  1. Add a text box from the Drawing toolbar (in PowerPoint 2007, go to Insert tab> Text Box), and type the text.
  2. Select the text box.
  3. On the Custom Animation task pane, choose Add Effect > Entrance > Appear.
  4. Click the animation item in the task pane. Click the down arrow and choose Effect Options.
  5. On the Effect tab, choose By Letter from the Animate Text drop-down list.
  6. Set the delay between letters. I chose 0.3 seconds.
  7. From the Sound drop-down list, choose Typewriter and click OK.
pptip_text_anim-4.jpg
Try the animation. I had the following problem -- there was no clicking sound for the last letter. That might not bother you, but it bothered me. I solved the problem by adding another letter at the end of the word and making it the same color as the background (so that it was invisible). This worked!
0010101 GIG hacker 1010101
www.gighacker.blogspot.com

Feb 02, 2010 | Computers & Internet

1 Answer

Write a program for analyzing which of severaol diff.vowels ,cont


#
# Since no language was specifiec, here's a solution in the
# gawk dialect of awk.
#
# Familiarity with awk is assumed, so only minimal comments
# are present. I have a version with more comments...
#


BEGIN {
IGNORECASE = 1
}

{ r0 = $0 } # Copy the input record into the variable r0, for efficiency

wc += gsub(/[[:blank:]]+/, "", r0) {} # Destructively count all the white spaces in r0

vc += gsub(/[AEIOU]/, "", r0) {} # Destructively count all the vowels in r0

cc += gsub(/[BCDFGHJKLMNPQRSTVWXYZ]/, "", r0) {} # Destructively count all the consonants in r0

END {
printf("%d vowel%s\n", vc, (vc != 1) ? "s" : "")
printf("%d consonant%s\n", cc, (cc != 1) ? "s" : "")
printf("%d white space%s\n", wc, (wc != 1) ? "s" : "")
}

Jan 02, 2009 | Computers & Internet

5 Answers

Source code for stack using arrays in c++


stack in c using arrays
/* Program of stack using array*/
#include

Dec 05, 2008 | Computers & Internet

1 Answer

Need code


Try the Following Five Programs

1) Program for Prime Number Generation

#include <stdio.h>
main()
{
int n,i=1,j,c;
clrscr();
printf("Enter Number Of Terms
");
printf("Prime Numbers Are Follwing
");
scanf("%d",&n);
while(i<=n)
{
c=0;
for(j=1;j<=i;j++)
{
if(i%j==0)
c++;
}
if(c==2)
printf("%d ",i)
i++;
}
getch();
}
--------------------------------------------------------------------------------------------------------------------------------------------------

2)Program for finding the prime numbers

#include <stdio.h>
#include <conio.h>
void main()
{
int n,m,k,i,max;
char c;
clrscr();
repeat: max=0;
k=2;
n=1;
printf("You want prime numbers upto:- ");
scanf("%d",&max);
printf("

");
for (i=1;i<=max;i++)
{
again: m=(n/k)*k;
if (m!=n)
k=k+1;
else
goto try1;
if (k < n/2)
goto again;
else
printf("%d",n);
printf(" ");
try1: n=n+1;
k=2;
}
fflush(stdin);
printf ("

Do you want to continue?(y/n):- ");
scanf("%c",&c);
if (c=='y')
goto repeat;
getch();

}
---------------------------------------------------------------------------------------------------------------------------------------------------

3)
  1. #include <stdio.h>
  2. int main(void) {
  3. int n,
  4. lcv,
  5. flag; /* flag initially is 1 and becomes 0 if we determine that n
  6. is not a prime */
  7. printf("Enter value of N > ");
  8. scanf("%d", &n);
  9. for (lcv=2, flag=1; lcv <= (n / 2); lcv++) {
  10. if ((n % lcv) == 0) {
  11. if (flag)
  12. printf("The non-trivial factors of %d are: \n", n);
  13. flag = 0;
  14. printf("\t%d\n", lcv);
  15. }
  16. }
  17. if (flag)
  18. printf("%d is prime\n", n);
  19. }
---------------------------------------------------------------------------------------------------------------------------------------------------

4)

#include<stdio.h>

#include<conio.h>

void main()

{

int n,i,c=0;

clrscr();

printf("enter the number:");

scanf("%d",&n);

for(i=1;i<=n;i++)

{

if(n%i==0)

{

c=c+1;

}

}

if(c==2)

printf("number is prime");

else

printf("number is not prime");

getch();

}
-------------------------------------------------------------------------

5)
#include<stdio.h>
#include<conio.h>
void main()
{
int a,b,c;
clrscr();
printf("enter the number:");
scanf("%d",&a);
for(b=2;b<a/2;b++)
{
if(n%i==0)
{
printf("\n Its not a Prime number");
c=1;
break;
}
if(flag==0)
printf("\n Its a Prime Number");
getch();
}
}


Sep 02, 2008 | Computers & Internet

1 Answer

C programme


here is the source code-
main()
{
int n,i,j,k;
printfI("Enter a number to form the triangle");
scanf("%d",&n);
printf("\n\t\t\t");
for(i=1;i<=n;i++)
printf(" ");
for(k=1;k<=i;k++)
printf("%ld",k);
for(k=i-1;k>0;k--)
printf("%ld",k);
printf("\n\t\t\t");
}
}

Aug 26, 2008 | Computers & Internet

2 Answers

C progarming language


i cannot write c program

Jun 24, 2008 | Computers & Internet

Not finding what you are looking for?

Open Questions:

0 Answers

Urjent ''[1]=[877]=[778]=[89=69]''Nortan Customer support Telephone Number? Call USA1-877-778-89-69 Nortan tech support is offer the power of any time, anyplace with the assistance of Nortan Antivirus support phone number . Any body will easy accessibility the Nortan Antivirus Support Phone Number. Norton Antivirus Support Phone Number, Norton Antivirus Customer Service Phone Number, Norton Antivirus Tech Support Phone Number, Nortan Antivirus support Helpline Number, Nortan Customer support Telephone Number.Nortan Helpdesk number,Nortan Tech support Telephone number,Norton Antivirus Tech Support Number,Nortan Internet Security Customer Support Number,Nortan Customer Service Technical Support Number. Norton Antivirus Support Phone Number Norton Antivirus Customer Service Phone Number Norton Antivirus Tech Support Phone Number Nortan Antivirus support Helpline Number Nortan Customer support Telephone Number Nortan Helpdesk number Nortan Tech support Telephone number Norton Antivirus Tech Support Number Nortan Internet Security Customer Support Number Nortan Customer Service Technical Support Number. Norton Antivirus Support Phone Number Norton Antivirus Customer Service Phone Number Norton Antivirus Tech Support Phone Number Nortan Antivirus support Helpline Number Nortan Customer support Telephone Number Nortan Helpdesk number Nortan Tech support Telephone number Norton Antivirus Tech Support Number Nortan Internet Security Customer Support Number Nortan Customer Service Technical Support Number. Norton Antivirus Support Phone Number Norton Antivirus Customer Service Phone Number Norton Antivirus Tech Support Phone Number Nortan Antivirus support Helpline Number Nortan Customer support Telephone Number Nortan Helpdesk number Nortan Tech support Telephone number Norton Antivirus Tech Support Number Nortan Internet Security Customer Support Number Nortan Customer Service Technical Support Number. Norton Antivirus Support Phone Number Norton Antivirus Customer Service Phone Number Norton Antivirus Tech Support Phone Number Nortan Antivirus support Helpline Number Nortan Customer support Telephone Number Nortan Helpdesk number Nortan Tech support Telephone number Norton Antivirus Tech Support Number Nortan Internet Security Customer Support Number Nortan Customer Service Technical Support Number. Norton Antivirus Support Phone Number Norton Antivirus Customer Service Phone Number Norton Antivirus Tech Support Phone Number Nortan Antivirus support Helpline Number Nortan Customer support Telephone Number Nortan Helpdesk number Nortan Tech support Telephone number Norton Antivirus Tech Support Number Nortan Internet Security Customer Support Number Nortan Customer Service Technical Support Number. Norton Antivirus Support Phone Number Norton Antivirus Customer Service Phone Number Norton Antivirus Tech Support Phone Number Nortan Antivirus support Helpline Number Nortan Customer support Telephone Number Nortan Helpdesk number Nortan Tech support Telephone number Norton Antivirus Tech Support Number Nortan Internet Security Customer Support Number Nortan Customer Service Technical Support Number. Norton Antivirus Support Phone Number Norton Antivirus Customer Service Phone Number Norton Antivirus Tech Support Phone Number Nortan Antivirus support Helpline Number Nortan Customer support Telephone Number Nortan Helpdesk number Nortan Tech support Telephone number Norton Antivirus Tech Support Number Nortan Internet Security Customer Support Number Nortan Customer Service Technical Support Number. Norton Antivirus Support Phone Number Norton Antivirus Customer Service Phone Number Norton Antivirus Tech Support Phone Number Nortan Antivirus support Helpline Number Nortan Customer support Telephone Number Nortan Helpdesk number Nortan Tech support Telephone number Norton Antivirus Tech Support Number Nortan Internet Security Customer Support Number Nortan Customer Service Technical Support Number. Norton Antivirus Support Phone Number Norton Antivirus Customer Service Phone Number Norton Antivirus Tech Support Phone Number Nortan Antivirus support Helpline Number Nortan Customer support Telephone Number Nortan Helpdesk number Nortan Tech support Telephone number Norton Antivirus Tech Support Number Nortan Internet Security Customer Support Number Nortan Customer Service Technical Support Number. Norton Antivirus Support Phone Number Norton Antivirus Customer Service Phone Number Norton Antivirus Tech Support Phone Number Nortan Antivirus support Helpline Number Nortan Customer support Telephone Number Nortan Helpdesk number Nortan Tech support Telephone number Norton Antivirus Tech Support Number Nortan Internet Security Customer Support Number Nortan Customer Service Technical Support Number.

Feb 20, 2017 | Norton Computers & Internet

Computers & Internet Logo

Related Topics:

79 people viewed this question

Ask a Question

Usually answered in minutes!

Top Computers & Internet Experts

Brian Sullivan
Brian Sullivan

Level 3 Expert

27725 Answers

kakima

Level 3 Expert

100174 Answers

David Payne
David Payne

Level 3 Expert

14160 Answers

Are you a Computer and Internet Expert? Answer questions, earn points and help others

Answer questions

Manuals & User Guides

Loading...