| C & C++ Language C & C++ Language |
![]() |
|
|
LinkBack | موضوع کے اختیارات | موضوع کی درجہ بندی | ظاہری انداز |
|
|
#1 |
|
Senior Member
![]() تاریخ شمولیت: Sep 2008
مراسلات: 7,538
کمائي: 88,280
شکریہ: 5,214
5,044 مراسلہ میں 11,479 بارشکریہ ادا کیا گیا
|
take the number and check the number is positive or negative if positive so show it square otherwise show the negative number i make it .it take number and give the square but positive when i give negative number its not work کوڈ:
#include<stdio.h>
#include<conio.h>
void main()
{
int a;
clrscr();
printf("Enter Number \n");
scanf("%d",&a);
if(2/a==0)
printf("Number is Positive:\n Squar of a is %d ",a*a);
else
printf("Number is Negative: %d ",a);
getch();
}
__________________
Life is a gift given to us by Allah.Death is a gift returned to Allah.
|
|
|
|
![]() |
| Tags |
| number, positive, show, solve, square, thi, this, when, work |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| موضوع کے اختیارات | |
| ظاہری انداز | Rate This Thread |
|
|
Similar Threads
|
||||
| موضوع | موضوع شروع کیا | فورم | جوابات | آخری مراسلہ |
| Solve this | Ashfaq Ahmed | Chit Chat | 2 | 08-11-07 06:18 PM |