answersLogoWhite

0

Write a shell program to test whether the given number is a perfect number or not.

#include
#include
void main()
{
int n,s=0,i;
clrscr()
printf("s=");
scanf("%d",&n);
for(i=0;i{
if(n==s)
printf("prfect");
else
printf("not");
getch();
}
User Avatar

Wiki User

16y ago

What else can I help you with?

Related Questions

How do write searching number programme in java?

give description of that then i will send the answer


Write a C programme to count the number of vowals present in your name?

abhimanyu


Write a programme for substraction of two numbers in c language?

substracion of any two number program in c


Write a Shell program to find the smallest number from a set of numbers?

k


Write a Shell program to find the sum of cube of individual digits of a number?

no thanks


Write a shell script that counts a number of unique word contained in the alphabetical order line by line?

use python, shell is stupid


Write a shell programs for to check whether the given number is an Avogadro number or not?

Avogadro's number is a constant. Therefore only one number is equal to Avogadro's number.


Write a shell script to count the number of times is appears in a given text file?

You don't need a shell script to do this; use the 'grep' command with the '-c' option to count the number of occurrences of some pattern.


Write a program number as a peimeter and checks whether it is perfect or not in java?

class perfect{public static void main(int n) // input as parameter{int a=0;for(int i=1;i


Write a program in shell script to display odd number from 0 to 100?

seq 1 2 99


What is the future perfect form of write?

The future perfect tense of the verb to write is will have written.


Write a c program using while loop to accept a number check and display message whether number is perfect or not?

The program is here guys.......... //Finding whether the given number is perfect or not //Starts here #include<stdio.h> void main() { int i=1,temp=0,number; scanf("%d",&number); while(i<=number/2){ if(number%i==0) temp+=i; i++; } if(temp==number) printf("Its a perfect number"); else printf("Its not a perfect number"); } //ends here