when user give a number it multiply with 9 without
useing '+' and '*' oprator

Answer Posted / guest

#include<stdio.h>
#include<conio.h>
#include<math.h>
void main()
{clrscr();
int a,i,r=0;
scanf("%d",&a);

for(i=a;i>0;i--)
r=r-9;
r=abs(r);
printf("%d",r);
getch();
}

Is This Answer Correct ?    4 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Do pointers take up memory?

641


What are header files why are they important?

566


Explain what are the standard predefined macros?

636


Explain how can you be sure that a program follows the ansi c standard?

846


shorting algorithmS

1786






How do we make a global variable accessible across files? Explain the extern keyword?

1406


How many levels of pointers have?

581


How to compare array with pointer in c?

610


Write a simple code fragment that will check if a number is positive or negative.

696


What is preprocessor with example?

570


What is the difference between class and object in c?

565


What is the -> in c?

567


What does stand for?

582


what is a function method?give example?

1904


What is pointers in c with example?

566