Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- int main(void){
- int n;/*表示文字数*/
- int i;/* ループ変数 */
- char s[100],*p;/*入力する文字と表示させる文字*/
- p=s;
- scanf("%s",s);
- scanf("%d",&n);
- for(i=0;i<n;i++,p++){
- putchar(*p);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment