Write c-code for 5+55+555+5555+55555+555555+5555555.
Output will be it's answer...
Answer Posted / vinod
main()
{
long int f=0,ans=0;
for(int i=0;i<7;i++)
{
f=f*10+5;
ans+=f;
}
printf("%ld",ans);
}
| Is This Answer Correct ? | 46 Yes | 12 No |
Post New Answer View All Answers
How can I get the current date or time of day in a c program?
Hi how many types of software editions are there and their difference (like home editions, enterprise, standard etc) can u please help me
What is the purpose of 'register' keyword in c language?
Sir,please help me out with the code of this question. Write an interactive C program that will encode or decode multiple lines of text. Store the encoded text within a data file, so that it can be retrieved and decoded at any time. The program should include the following features: (a) Enter text from the keyboard, encode the text and store the encoded text in a data file. (b) Retrieve the encoded text and display it in its encoded form. (c) Retrieve the encoded text, decode it and then display the decoded text. (d) End the computation. Test the program using several lines of text of your choice.
What are the different file extensions involved when programming in C?
What are the types of assignment statements?
Why clrscr is used after variable declaration?
how many errors in c explain deply
Why & is used in scanf in c?
What are the different types of control structures?
Are there namespaces in c?
What are the advantages of using linked list for tree construction?
Define and explain about ! Operator?
What are the 3 types of structures?
List out few of the applications that make use of Multilinked Structures?