0 like 0 dislike
8.1k views

Question 8: Please a write a program that receives 2 integer numbers, then outputs numbers between those inputs. If the inputs are equal, write the input number instead.

*No space between the output numbers*

Input1

1 5

Output 1

12345

 

Input2

-3 3

Output2

-3-2-10123

 

Input3

5 5

Output3

5

 

[Exam] asked in Final examination by (5.9k points)
ID: 41942 - Available when: Unlimited - Due to: 2018-01-17 16:30

edited by | 8.1k views

30 Answers

0 like 0 dislike
Hidden content!
#include <stdio.h>
#include <stdlib.h>
int main (int argc, char *argv[])
{
  int a,b;
  scanf("%d%d", &a, &b);
  while(a<=b){
* ** * ** ** *** **** ****** * * ** *** *** ** * * * * **** ***** printf("%d",a);
* *** * ** *** ** ** *** * ** ** ****** * * * ** * * * ** ** ** ** ** * ** ** * ** * ** ** **** * * **** ** ***** ** **** *** * **** * **
** ** * * ** * *** * * **** * *** * * *** ***** * * ** * **** * * ** * * **** **** *** ** * ** ** **** * **** * ** * **** * * * *** * ** ** ** *
* ** * * ** * **** * ** ** *** * ** * ***** ** * * *** ** ** * *** * ** ** ** * * **** ** * ***** *** * * **** *** * * * * ** ** * ***** * * **
*** * * **** * ** * * * ***** ** * * *** *** * ** * ** **** ** ** * * ** * ** * * ******** * *** ******** *** * * **** * ** * ** *** ** * ** *** * *
* * * ****** * * *** * * * * * * ** ** ** * **** ***
   return 0;
}   
* * ** ** * * * * *** * * **** ** * * * * ** *** * * *** * ** ** *** ** *** *** *** ** ** * * * *** **** * * ** ** ** ** * ** ******** * **** ** * *** ** *** * * * * * *
answered by (246 points)
0 0
prog.c: In function 'main':
prog.c:8:14: error: stray '\302' in program
              \xc2\xa1@ printf("%d",a);
              ^
prog.c:8:15: error: stray '\241' in program
              \xc2\xa1@ printf("%d",a);
               ^
prog.c:8:16: error: stray '@' in program
              \xc2\xa1@ printf("%d",a);
                ^
0 like 0 dislike
Hidden content!
#include <stdio.h>
#include <stdlib.h>

int main(int argc, char *argv[]) {
    
    int a,b;
* ** *** * ** * ** * ** * ** * **** * ** * *
    while(a<=b){
** *** *** ** * * ** * *** ***** * **** **** ** ** ***** * * * * ** ** **** *
***** * * * ** * * * * * *** *** *** * ***** ****** * * * *** **** ** * * *** * * * ** * ** *** ** * *** * ** **** * ******
* * * * *** **** * * * **** * ** ***** * * * ** ** * * ***** ****** *** * ** * * ******** *** *** * **** ****** * * ***
* * * **** ** ** * * * *** * *** * ** * * * ** *** ** * ** *** ** ** *** ** * * *** * * *** ** * * **** ** * * ** *
** * **** ** * * * *** * *** ** ** * * * ****** * ** * ***** * * * ****** ********* **** *** * *** ***** ** ** * *** * * *** *** * ,a);
* ** ** * ***** * * * ** *
   return 0;
}
100/100 answered by (153 points)
0 0
Case 0: Correct output
Case 1: Correct output
Case 2: Correct output
Case 3: Correct output
0 like 0 dislike
Hidden content!
#include <stdio.h>
#include <stdlib.h>

int main(int argc, char *argv[])
{
    int a,b;
** ** * * * ** ***** **** , &a, &b);
* * ******** ** ** * * **** *
    {
* * ***** * **** * ** *** * **** * * * *** * ***** * ***** * * * ** ** ** * ** * ** * * *** * * **** ,a);
** *** * * ** *** * * **** * * * ***** * ** * * ** * ** ** ** * * *** ** * * ** * * **
*** * * * * * * *** *** * ** * * * ** **** * ** *** * ** *** ** ** * * * * * * * *** **
* *** ** * * **** * * * * * ** * * * **** ** ** ** * * *** * ** * * * ****** ** ***** *
* *** ** * ** * ** ** * * *** ***** * ** * ** * * *** ** * * *** * * ** ** *** ** * *** ***** ,a);
* * ** * * ****** **** * *** ** * ** ******* *** **** * ******** ** *** **** ** * ** * * *
** * * * * ** ******* ******* * ***
    return 0;
}
answered by (183 points)
0 0
prog.c: In function 'main':
prog.c:10:23: error: expected ';' before string constant
                 printf"%d" ,a);
                       ^~~~
prog.c:10:30: error: expected statement before ')' token
                 printf"%d" ,a);
                              ^
0 like 0 dislike
Hidden content!
#include <stdio.h>
#include <stdlib.h>

int main(int argc, char *argv[])
{
    int a,b;
*** * ***** * ** **** ** * ** * * , &a, &b);
* **** * * * * * ** ** * * * {
**** **** * ** * *** * **** **** * * ** *** * ** ** *** ****** **** ** * **** *** *** * * * ** ,a);
*********** * *** ** ** *** * ** *** * *** * * ** *** * ** *** *** * * **** * * **** *
* ** *** * ** * **** ****** * * * * ** ******** * *** * * * * ** ** * * *
* * * *** **** ** * * ** *** * * * * * ** **** ** * ** ** ** ** **** *
* ****** * *** * * * * ** * ******* ***** ** * ** * * * ** * * ** **** * * *** * ** * * * ,a);
***** * * * *** ** ** ** * * * *** ***** * * *** * *** ** ** * **** * *** * * *
** *** ** * * ** ** * ******* * * * *******
    return 0;
}
answered by (183 points)
0 0
prog.c: In function 'main':
prog.c:9:23: error: expected ';' before string constant
                 printf"%d" ,a);
                       ^~~~
prog.c:9:30: error: expected statement before ')' token
                 printf"%d" ,a);
                              ^
0 like 0 dislike
Hidden content!
#include <stdio.h>
#include <stdlib.h>

int main(int argc, char *argv[])
{
    int a,b;
** ** * * * ** ** * ** * ** ** * * * * * ** ** *
* * * * ** *** * **** * ***** **
**** * *** ** * * * * *** * * * * * ** ** ** *** ** * ** * ** * * **** ** ***** *** ** * * ** * * ** ** ** *****
** * * * *** **** ** * ** * * * * ** *** ***** **** *** * ** ** * ** * * *****
* ******* *** ** * * * * * * * * ** * ** * * * * * * * ** ** * *** * * * * * * * *
*** ** ** ** * * * ** * *** ** ** ** * * * ***** *** ** * ** ** * ** ***** * ** ** * * *
* ** * * * ** ***** * ***** * **** *** * * ** * **** * * * ** ** * * * * **** * * ** * * * ** **

    return 0;
}
100/100 answered by (283 points)
0 0
Case 0: Correct output
Case 1: Correct output
Case 2: Correct output
Case 3: Correct output
0 like 0 dislike
Hidden content!
#include <stdio.h>
#include <stdlib.h>
int main(int argc, char *argv[])
{
    int number1, number2;
* * ** ** * **** ** ********* ** ** * ** &number1, &number2);
** ** **** ** ** * * *** ** ** <= number2){
* ** ** * ** ** * ** * * ***** **** number1);
* * * *** * *** *** *** ** * * = number1 + 1; **** * ** ** ** * ** **** * *** * ** * ** * * * ** * * * * ***** * * *** ******** *** ** ** * **** * **
}
* * ** * * * ***** * * ** * * *** == number2)
* * * * *** ** *** * * * *** * ** * * *** ** *
***** * * ** * ********* *** * * *** * * ** *
* * * ** * ****** ** ** * ** * ** * * * *** ** ****** *** ***** ** * * ** **** * ** * *** **** *** * * * * * ** *
*** * * *** * * ** ** **** ** * * * *
** * * * *** * * ** * ** ** * * ** * * 0;
* * * *** * * ****** * *
}
100/100 answered by (220 points)
0 0
Case 0: Correct output
Case 1: Correct output
Case 2: Correct output
Case 3: Correct output
0 like 0 dislike
Hidden content!
** ** * **
* * * * ** **** * **

int main() {
*** ** ** int x,y;
** *** * *** *
    ** * * * ***** ***
* * * * ** * * ** ** *** * ***** *
* ** ** * * *
* ** * ** ** * ** * **
* ** * ** * * ** ** * for(int * * ** **
* *** * * * * * ** ** * ******   ** * * *****
* ******       }
** * ** ** *** }else ** *** * *
* ***** * * ** *** ***** for(int * ****** ****
** * * ** * * * *** * *** * ** * * *** ******
* * ** * ** * * }
* *** ** }else{
* *** ** * * * * ** * * * ** ***
* * **** * }
}
100/100 answered by (244 points)
0 0
Case 0: Correct output
Case 1: Correct output
Case 2: Correct output
Case 3: Correct output
0 like 0 dislike
Hidden content!
#include <stdio.h>
#include <stdlib.h>

int main(int argc, char *argv[])
{
    int a,b;
    scanf("%d%d" , &a, &b);
    while(a<=b){
** * **** * * * ** *** * * * * * * ** * ********** * ** * * ** ***** ** *** * *** ***** * **** * ** * ,a);
* * * ** **** ******* ** * * *** * * ** ** * * ** * ************* *** * ** ** * ** *** * ** * * *** ** ***** * *** ** ** **** * ***** * *** * ** ** ****** ** ** * ****
******** * ***** ** ** * * * * * * * ** *** ** * **** * * **** * ** * ** ** * * ***** ******* ** * *** * * *** ** * * ** ** * ** * * * ** * * *** **
* ** ** * * ** * * ** * * * * ** ** * * ***** ** ***** ** * * **** *** ** * ** * *** **** ** * ** ** * * * **** * * ***** * * *
* ***** * ** ****** * * ** ****** ** * ** *** *** ** **** ** * * * ** * ** * **** * **** *** **** ** * ** * * ** ** **** **** * ** * ****** * ** *** * * *** * ** * ******** ** * * ,a);
** *** ** * ** ** * * * * ***** *** ** * * * * ** *** * *** * *** **** * **** *** * * ** * * ** * * * * * * * * ** ** * ** * * *** **
* *** ***** ** * ********* * * * **** *** * ******** * *** ****** **** * ** * ** * ***** * ** *** * **** * * ** * ** ** * * * * * ** *** * **** ** * *
    system("PAUSE");
    return 0;
}
100/100 answered by (254 points)
0 0
Case 0: Correct output
Case 1: Correct output
Case 2: Correct output
Case 3: Correct output
0 like 0 dislike
Hidden content!
** * * * * **
* * ** *** ****

int main() {
* ** int x,y;
*** ** *****
    ** *** * * ** ** *
** ** * *** ****** * ** * * * *
* * ** * *
* ** ** ** * **
* * ** ** * * * * for(int * * ** *
* ** * * * * * ** * ** * ** * ** *** * * **** *
** *       }
** *   }else * *
***** *** * *** for(int *** *** * *
* * * * * * *** ** **** * *** * ** ** * ** *
*** * * * **** * * * }
* * ** * * }else{
* *** ** * ** * *** ** ** * * ** ****
* * }
}
100/100 answered by (244 points)
0 0
Case 0: Wrong output
Case 1: Wrong output
Case 2: Wrong output
Case 3: Correct output
0 like 0 dislike
Hidden content!
* ** * ** *** ** ** *
**** *** ** ** * **

int main() {
* *** * *** **** int x,y;
* * ** ***
    * ***** ******* *
* ** * *** **** ** *
*** * ** **
** * * * * ***** *******
* * * * * ** *** * ** for(int * ** *** **
* * ** * * ** *** **** * *** ** * ***** **
**** **       }
* ** **   }else *** *
**** * * * * *** * ** for(int * * **** **
** * ****** ** * ** * * * * * * ** * ***** *
* ** ****** ***** ** * ** }
** * * *** * }else{
** **** *** *** *** * **** ** * * ** ****
** ** ** }
}
answered by (244 points)
0 0
Case 0: Wrong output
Case 1: Wrong output
Case 2: Wrong output
Case 3: Correct output
Welcome to Peer-Interaction Programming Learning System (PIPLS) LTLab, National DongHwa University
English 中文 Tiếng Việt
IP:172.70.50.50
©2016-2025

Related questions

0 like 0 dislike
22 answers
[Exam] asked Jan 13, 2018 in Final examination by nat236919 (5.9k points)
ID: 41975 - Available when: Unlimited - Due to: 2018-01-17 16:30
| 7.7k views
0 like 0 dislike
21 answers
[Exam] asked Jan 13, 2018 in Final examination by nat236919 (5.9k points)
ID: 41968 - Available when: Unlimited - Due to: Unlimited
| 7.1k views
0 like 0 dislike
26 answers
[Exam] asked Jan 13, 2018 in Final examination by nat236919 (5.9k points)
ID: 41937 - Available when: Unlimited - Due to: 2018-01-17 16:30
| 4.1k views
0 like 0 dislike
21 answers
[Exam] asked Jan 13, 2018 in Final examination by nat236919 (5.9k points)
ID: 41935 - Available when: Unlimited - Due to: 2018-01-17 16:30
| 3.3k views
0 like 0 dislike
23 answers
[Exam] asked Jan 13, 2018 in Final examination by nat236919 (5.9k points)
ID: 41926 - Available when: Unlimited - Due to: 2018-01-17 16:30
| 3.6k views
12,783 questions
183,442 answers
172,219 comments
4,824 users