1161:0 start-up algorithm 68--delete character (not AC)

Source: Internet
Author: User

1161:0 start-up algorithm 68--delete character time limit:1 Sec Memory limit:64 MB 64bit IO Format:%lld
submitted:1412 accepted:479
[Submit] [Status] [Web Board] Description

Entering any string and a character from the keyboard requires that all of the characters be removed from the string.

Input

Input has multiple sets of test data.
For each set of two lines, the first line is a string (the string has at least one character, no more than 100), and the second line is a character

Output

One row per set of output, removing all strings that should be deleted

Sample Input
ABCDEEASD DFG FHDD

Sample Output
Abcdas FG FHD

Source

0 Starting point Learning algorithm

1#include <stdio.h>2#include <string.h>3 intMain () {4     Charch1[ -],ch2[ -];5      while(Gets (CH1)! =NULL) {6         CharC;7scanf"%c",&c); 8 GetChar ();9         intj=0;Ten          for(intI=0; ch1[i]!=' /'; i++){ One             if(ch1[i]!=c) { Ach2[j++]=Ch1[i]; -             } -         } the          - puts (CH2); -     } -     return 0; +}

1161:0 start-up algorithm 68--delete character (not AC)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.