You are not logged in. Please login at www.codechef.com to post your questions!

×

storing large number

how to take a number having 1000000 digit as input in C

asked 09 Sep '17, 14:23

satya1998's gravatar image

1★satya1998
111
accept rate: 0%


you have to take it as an array. you can't store such large numbers in any int or long type number.

@simran1467, don't answer if you don't know it. You may lead the person in a wrong way.

link

answered 09 Sep '17, 16:32

sudip_95's gravatar image

4★sudip_95
7556
accept rate: 10%

long long int
it can fit i gues 10^19 digits

link

answered 09 Sep '17, 23:37

phantomhive's gravatar image

4★phantomhive
944
accept rate: 0%

1

Long long int fitting ${10}^{19}$ $DIGITS$ ? Are you $sure$ ??

(10 Sep '17, 00:14) vijju123 ♦♦4★

I believe it's 10^18 not sure though

(10 Sep '17, 00:31) kunnu1202★
1

lol it's not "digits" - max number is 10^18 @vijju123 just saw your bold DIGITS

(10 Sep '17, 00:32) kunnu1202★
1

XD . Even python cant store a number that large. Leave python, even arrays cant store those many digits XD

(10 Sep '17, 01:23) vijju123 ♦♦4★

it can be store in string

link

answered 11 Sep '17, 00:02

avsingh999's gravatar image

2★avsingh999
414
accept rate: 5%

-1

include<stdio.h>

void main() { long n; printf("enter the number"); scanf("%d",&n); getch(); }

link

answered 09 Sep '17, 15:23

simran1467's gravatar image

0★simran1467
-1
accept rate: 0%

toggle preview
Preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported
  • mathemetical formulas in Latex between $ symbol

Question tags:

×47

question asked: 09 Sep '17, 14:23

question was seen: 281 times

last updated: 11 Sep '17, 00:02