c exponential until value

Solutions on MaxInterview for c exponential until value by the best coders in the world

showing results for - "c exponential until value"
Rohan
03 Jan 2020
1#include <stdio.h>
2#include <stdlib.h>
3
4int main() {
5	int a, b, c;
6	
7	printf("Enter number: ");
8	scanf("%d", &a);
9	
10	printf("\nEnter limit: ");
11	scanf("%d", &b);
12	
13	c = a;
14	
15	while(a < (b + 1))
16	{
17		printf("\n%d", a);
18		a = a * c;
19	}
20	
21	printf("\n\n");
22	
23	system("pause");
24}