Preview

Palindrome

Good Essays
Open Document
Open Document
1937 Words
Grammar
Grammar
Plagiarism
Plagiarism
Writing
Writing
Score
Score
Palindrome
PALINDROME #include <stdio.h> #include <string.h> int main() { char a[100], b[100]; printf("Enter the string to check if it is a palindrome\n"); gets(a); strcpy(b,a); strrev(b); if( strcmp(a,b) == 0 ) printf("Entered string is a palindrome.\n"); else printf("Entered string is not a palindrome.\n"); return 0; }

PRIME NUMBER OR NOT
#include<stdio.h>

main()
{
int n, c = 2; printf("Enter a number to check if it is prime\n"); scanf("%d",&n); for ( c = 2 ; c <= n - 1 ; c++ ) { if ( n%c == 0 ) { printf("%d is not prime.\n", n); break; } } if ( c == n ) printf("%d is prime.\n", n); return 0;
}

ARMSTRONG OR NOT
#include <stdio.h> int main()
{
int number, sum = 0, temp, remainder; printf("Enter an integer\n"); scanf("%d",&number); temp = number; while( temp != 0 ) { remainder = temp%10; sum = sum + remainder*remainder*remainder; temp = temp/10; } if ( number == sum ) printf("Entered number is an armstrong number.\n"); else printf("Entered number is not an armstrong number.\n"); return 0;
}
OR
#include<stdio.h>
void main()
{
int num,num1,arms=0,rem; printf("Enter the number:\n"); scanf("%d",&num); num1=num; while(num>0) { rem=num%10; arms=arms+rem*rem*rem; num=num/10; } if(num1==arms) { printf("

You May Also Find These Documents Helpful

  • Satisfactory Essays

    Ap Extra Credit 2

    • 399 Words
    • 2 Pages

    F2: The muscles that comprise Thenar Eminence include: Abductor Pollicic Brevis, Flexor Pollicis Brevis and Oppenous Pollicis.…

    • 399 Words
    • 2 Pages
    Satisfactory Essays
  • Better Essays

    printf(" %d \t\t %d\n\n",stfor->wt,stfor->tt); ttl_wt += stfor->wt; ttl_tt += stfor->tt; temp = np = stfor; del_node(np,1) ; ++i; } else { stfor->bt -= qt; stfor->tt = temp->tt + qt; printf(" %d \t\t %d\n\n",stfor->wt,stfor->tt); np = temp = stfor; del_node(np,2); ins_node(temp); } }while(stfor !=…

    • 401 Words
    • 2 Pages
    Better Essays
  • Powerful Essays

    Math 533

    • 1143 Words
    • 5 Pages

    The Relationships between Location, Income, and Credit Balance for the customers of AJ Davis Department Store…

    • 1143 Words
    • 5 Pages
    Powerful Essays
  • Better Essays

    Math 533

    • 2101 Words
    • 9 Pages

    AJ Davis is a department store chain, which has many credit customers and want to find out more information about these customers. AJ Davis has complied a sample of 50 credit customers with data selected in the following variables: Location, Income (in $1,000’s), Size (Number of people living in the household), Years (number of years the customer has lived in the current location), and Credit Balance (customers current credit card balance on the store’s credit car, in $).…

    • 2101 Words
    • 9 Pages
    Better Essays
  • Satisfactory Essays

    05 02 Task English

    • 438 Words
    • 2 Pages

    When contrasting with the cemetery, he's suggesting that this moral evil will bring death to civilized society…

    • 438 Words
    • 2 Pages
    Satisfactory Essays
  • Good Essays

    Math 222

    • 643 Words
    • 3 Pages

    Next we are to compose two pairs of the functions into each other. First we will work out:…

    • 643 Words
    • 3 Pages
    Good Essays
  • Satisfactory Essays

    204english

    • 384 Words
    • 2 Pages

    1. According to the first paragraph, who will "shrink from the service of his country"?The summer soldier and the sunshine patriot will “shrink from the service of his country” 2. What will the people who do not shrink from service deserve?The people who do not shrink deserve the love and thanks of man and woman. 3. According to the first paragraph, what has Britain declared?Britain has declared the right to tax and also "to BIND us in ALL CASES WHATSOEVER". 4. According to the final paragraph, what will a person "whose heart is firm" pursue "unto death"?The person whose heart is firm will pursue his principles unto death. 5. What opinion of offensive wars does Paine express in the final paragraph?He expresses that he believes it is murder. 6. What does Paine mean when he refers to "the summer soldier" and "the sunshine patriot"?When Paine refers to the summer soldier and sunshine patriot he means the soldiers and officials that do not try their best and are only there when times are good, but back out when times get rough. 7. What is the point of Paine's story about the tavern keeper at Amboy?Paine is trying to point out the people that are trying to avoid war with England 8. Name two emotions to which Paine appeals in his essay. Anger and disappointment are two emotions that Paine shows. 9. How might a colonist who had remained loyal to the British react to Paine's argument?Some colonist who had remained loyal to the British might have reacted in the way of disapproval and without an open mind. They also could have acted upon themselves to go against Paine and start an uprising because of his beliefs. 10. Paine uses the aphorism "the harder the conflict, the more glorious the triumph" to express his belief that hardships faced by the American forces during the war will make their eventual victory more meaningful. Find one more aphorism used in Paine's essay and explain the point he is making with it.Another aphorism is “what we…

    • 384 Words
    • 2 Pages
    Satisfactory Essays
  • Satisfactory Essays

    Vocab from 1984

    • 266 Words
    • 2 Pages

    Everyone had to send in a compendium stating his or her accomplishments during their soccer career in order to tryout for LMU’s soccer team.…

    • 266 Words
    • 2 Pages
    Satisfactory Essays
  • Good Essays

    AlternateEnding

    • 922 Words
    • 3 Pages

    … Farquhar loses consciousness as he plummets down from the side of the bridge. He is awakened by currents of pain running through his body. He his still distraught, but as he regained consciousness of the situation he realized that the noose had broke from the bridge and he was still alive. Although the northern soldiers are aware the noose had broke and Farquhar had fallen into the water they didn’t really believe he could survive, after all he did fall quite the distance and his hands were bound behind his back. They saw him struggling for breath and before leaving they fired a shot at him. It appeared to hit him as Farquhar disappeared in the water. The northern soldiers left, uneasy about whether this man was dead or alive, they marched on.…

    • 922 Words
    • 3 Pages
    Good Essays
  • Good Essays

    Peremptory Challenge

    • 489 Words
    • 2 Pages

    In Kennedy Race, Crime, and the Law; chapter 6, he covers the Peremptory Challenge, which allows attorneys to exclude potential jurors without having initially to articulate the basis for the exclusion. In other words, giving a defendant or lawyer the right to object to a proposed juror, without a given reason. Kennedy also goes in depth to explain two controversies issues regarding the usage of the peremptory challenge, such as the conflict over the racially discriminatory peremptory challenge and how racial discrimination is practiced despite the formal legal disapproval. In chapter 7, Kennedy moves forward to cover whether or not ceasing to discriminate against racial minorities will suffice to establish racial justice or to cease discrimination…

    • 489 Words
    • 2 Pages
    Good Essays
  • Good Essays

    Seventeen Syllables

    • 629 Words
    • 3 Pages

    They say that at the heart of every family tradition is a meaningful experience. However in the Hayashi household, there are a lot of diverging traditions but no family. Due to the characters’ individual attachments to different traditions and cultures, it created a gap in their family dynamic. Hisaye Yamamoto, who is the daughter of immigrant parents, wrote Seventeen Syllables as a look into the gap resulting from having different assimilations to culture.…

    • 629 Words
    • 3 Pages
    Good Essays
  • Better Essays

    Haiku

    • 1080 Words
    • 5 Pages

    Haiku is a popular form of poem in Japan. It is an unrhymed writing and because the content is very brief, usually only three lines for a complete poem, it is necessarily imagistic to create a vivid picture of the nature and seasons. Matsuo Basho, a famous haiku poet in Japan, mastered this form of poem and the poem “Four Haiku” is one of his writing. In this poem, we can easily see the change of life, from the beginning to the end, through many images of nature which symbolize the circle of life of a person.…

    • 1080 Words
    • 5 Pages
    Better Essays
  • Satisfactory Essays

    Crossword Puzzle

    • 456 Words
    • 12 Pages

    Crossword Puzzle 1 r 2 f e 3 a c 4 r o n y m 5 g e n e r i c e e i 6 c l u s t e r 7 i n g d t e n b 8 c l u e 9 s 10 b a r r i e 11 r s t 12 r a c v e 13 i n f e r e n c e h 14 r i d r c k e 15 q u e s t…

    • 456 Words
    • 12 Pages
    Satisfactory Essays
  • Satisfactory Essays

    oblicon fill in the blanks

    • 1773 Words
    • 11 Pages

    Art. 1158. Obligations ______ from ______ are not ______. Only those ______ ______ in this Code or in special laws are ______, and shall be ______ by the ______ of the law which ______ them; and as to what has ______ been ______, by the ______ of this ______. (1090)…

    • 1773 Words
    • 11 Pages
    Satisfactory Essays
  • Good Essays

    Grammatik

    • 501 Words
    • 2 Pages

    1. All the sheep and the old sheepdog was basking in the sun at noon.…

    • 501 Words
    • 2 Pages
    Good Essays