it should also work fine if i=1. right?
and if (i=1;s<=7;i++) then,
s=0+1
s=1+2
s=3+3
s=6
the output should be 6.
where's the problem!
Search found 384 matches
- Sat Nov 10, 2012 9:13 am
- Forum: Computer Science
- Topic: Problem executing a Program
- Replies: 5
- Views: 8945
- Fri Nov 09, 2012 1:10 pm
- Forum: Computer Science
- Topic: Problem executing a Program
- Replies: 5
- Views: 8945
Problem executing a Program
Code: Select all
// Sum of first n integer using loop
#include <stdio.h>
int main()
{
int a,s=0,i;
scanf("%d \n",a);
for(i=0;s<=a;i++) //try to do this using only 2 VARIABLES
s=s+i;
printf("the sum is: \t %d",s);
return 0;
}
- Wed Nov 07, 2012 1:42 am
- Forum: Combinatorics
- Topic: facing a problem... Need solution.
- Replies: 4
- Views: 4653
Re: facing a problem... Need solution.
i guess you should give the solution
- Sun Sep 09, 2012 12:37 pm
- Forum: International Olympiad in Informatics (IOI)
- Topic: গণিত সমাচার
- Replies: 4
- Views: 5477
- Tue Jul 24, 2012 5:21 pm
- Forum: Chemistry
- Topic: Some questions about Dew Point
- Replies: 2
- Views: 8921
Some questions about Dew Point
১। খোলা জায়গায় শিশিরাংকের উপরে তাপমাত্রা বাড়া/কমার জন্য কি বাতাসে উপস্থিত জলিয় বাষ্হ্পের পরিমান বাড়ে/কমে?(যেমনঃ কোন জায়গার শিশিরাংক ১০ ডিগ্রি। সেখানকার তাপমাত্রা ৪০ ডিগ্রি থেকে ৩৫ ডিগ্রিতে নামলে কি জলীয় বাষ্হ্পের পরিবর্তন হবে?) ২। খোলা জায়গায় পরিবেশের তাপমাত্রা পরিবর্তন হলে কী শিশিরাংকের পর...
- Tue Jun 26, 2012 9:17 pm
- Forum: Higher Secondary Level
- Topic: Simplify the term
- Replies: 2
- Views: 2970
Simplify the term
simplify(i.e $a^p + a^q +...$) the term: $(a+ \sqrt{1-a^2})^6 + (a- \sqrt{1-a^2})^6$
- Sun Jun 24, 2012 9:21 pm
- Forum: Chemistry
- Topic: বাতাস কি সমসত্ব?
- Replies: 1
- Views: 8070
Re: বাতাস কি সমসত্ব?
একটু চিন্তা করে দেখ।
বাতাস অসমসত্ব। আর উপরে নিচের ব্যাপারটা ঠিক আছে। মাটির নিচে $CO_2$ বেশী। আর বজ্রপাতের সময় নাইট্রোজেন নিচে নেমে আসে।
বাতাস অসমসত্ব। আর উপরে নিচের ব্যাপারটা ঠিক আছে। মাটির নিচে $CO_2$ বেশী। আর বজ্রপাতের সময় নাইট্রোজেন নিচে নেমে আসে।
- Sun Jun 24, 2012 9:13 pm
- Forum: Chemistry
- Topic: Why Non-Polar is soluble in Polar
- Replies: 1
- Views: 7884
Why Non-Polar is soluble in Polar
কিছু কিছু অপোলার যৌগ(চিনি) পোলার দ্রাবকে দ্রবীভূত হয় কেন?
- Fri Jun 01, 2012 8:42 pm
- Forum: Combinatorics
- Topic: A Classic One
- Replies: 3
- Views: 3171
Re: A Classic One
২. ১,২,৩,৪,৫,৬,৭ => # ৪,১,৫,২৬,৩,৭ #৪,২,৫,১,৬,৩,৭ এভাবে সাজানো যাবে?
- Fri Jun 01, 2012 8:19 pm
- Forum: Computer Science
- Topic: Hacking and Cracking
- Replies: 7
- Views: 6325