C Programming Index-2

[1.]
A particle has initial velocity and acceleration. If its velocity after certain time is v then what will its displacement be in twice of that time?
Input The input will contain two integers in each line. Each line makes one set of input. These two integers denote the value of v (−100 ≤ v ≤ 100) and t (0 ≤ t ≤ 200) (t means at the time the particle gains that velocity)
Output For each line of input print a single integer in one line denoting the displacement in double of that time.

View Details

[2.]

Abul and Kuddus are two brothers. Both of them are sell flowers in street. Abul sell the flowers in Mohakhali and Kuddus sell in Shahbag. End of the day Abul earn average 1000 tk. Where Kuddus have only 400. So Kuddus is never earn greater than Abul.
Input
The input contains two numbers in every line. These two numbers in each line denotes the amount of earn Abul and Kuddus or vice versa. The input numbers are not greater than 2^32. Input is terminated by ‘End of File’.
Output
For each line of input, print the difference of amount of Abul and Kuddus. Each output should be in separate line.

View Details

1 comment:

1. Name: Md.Nazmul Hoque
Id: 201820301
Batch: 58th

C Program to check a Palindrome

#include
using namespace std;
class palindrome
{
public:
int i,num,rev=0,temp,x=0;
palindrome()
{
cout<<"Enter value ";
cin>>num;
temp=num;
}
~palindrome()
{

}
int checkp()
{
while(temp!=0)
{
i = temp%10;
rev = rev*10+i;
temp /= 10;
}
if(num ==rev)
x=1;
else
x=0;
}
};
int main()
{
palindrome p;
p.checkp();
//cout<<p.x;
if (p.x == 1)
cout<<"This number is palindrome";
else
cout<<"This is not palindrome";
}
{"ft_lang_label":"__label__en","ft_lang_prob":0.8080458,"math_prob":0.8965234,"size":1956,"snap":"2019-26-2019-30","text_gpt3_token_len":531,"char_repetition_ratio":0.12243853,"word_repetition_ratio":0.36752138,"special_character_ratio":0.28374234,"punctuation_ratio":0.12776412,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.98820657,"pos_list":[0,1,2],"im_url_duplicate_count":[null,null,null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2019-06-18T09:06:56Z\",\"WARC-Record-ID\":\"<urn:uuid:1ed777e2-0dbb-4f30-ab56-09af0a628f5d>\",\"Content-Length\":\"100057\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:31be701e-75ae-4491-b9ec-113fb48fa708>\",\"WARC-Concurrent-To\":\"<urn:uuid:f7313506-a761-4276-b366-c59a44a64cee>\",\"WARC-IP-Address\":\"172.217.15.115\",\"WARC-Target-URI\":\"http://www.c-programming-blog.com/p/c-programming-index-2.html\",\"WARC-Payload-Digest\":\"sha1:UTJPPFQHB6MRVNU7LQ5VQFYGRBKUIWD6\",\"WARC-Block-Digest\":\"sha1:2RMKRZQRASDNFESNQI7ESDPIHBW3QXZZ\",\"WARC-Identified-Payload-Type\":\"application/xhtml+xml\",\"warc_filename\":\"/cc_download/warc_2019/CC-MAIN-2019-26/CC-MAIN-2019-26_segments_1560627998708.41_warc_CC-MAIN-20190618083336-20190618105336-00003.warc.gz\"}"}