Write c-code for 5+55+555+5555+55555+555555+5555555.
Output will be it's answer...
Answer Posted / ashish
#include<stdio.h>
#include<math.h>
void main()
{ long int f=0,ans=0,i;
clrscr();
for(i=0;i<7;i++)
{
f=f*10+5;
ans+=f;
}
printf("%ld",ans);
getch();
}
| Is This Answer Correct ? | 19 Yes | 8 No |
Post New Answer View All Answers
How can I find the modification date and time of a file?
What is d scanf?
How do you define a string?
Who developed c language?
What are the benefits of organizational structure?
How many loops are there in c?
What is the default value of local and global variables in c?
Draw a diagram showing how the operating system relates to users, application programs, and the computer hardware ?
What is build process in c?
How can I trap or ignore keyboard interrupts like control-c?
List the variables are used for writing doubly linked list program.
Is c call by value?
What is a char in c?
What is scope and lifetime of a variable in c?
What is the use of f in c?