Month: February 2016
puts() in c i will implement. Main job of this function is to print a new line…
#include<bits/stdc++.h> using namespace std; int main() { long long int a,b,diff; while((scanf(“%lld%lld”,&a,&b)!=EOF)) { diff=abs(a-b); printf(“%lld\n”,diff); } return…
#include<bits/stdc++.h> using namespace std; int main() { int a,t; while(1){ scanf(“%d”,&a); if(a==42){ break; } else{ printf(“%d\n”,a); }…
Accepted code: #include<bits/stdc++.h> using namespace std; int main() { int testcases,cases; long a,b,c; scanf(“%d”,&testcases); if(testcases>0 && testcases<20)…
Code: #include<bits/stdc++.h> using namespace std; int main() { int testcase,cs,j,a,b,low,high; int counter=0; scanf(“%d”,&testcase); for(cs=1; cs<=testcase; cs++) {…
#include<iostream> #include<cstring> #include<cstdio> using namespace std; int main(){ char ary[6]; int counter=0; while(1) { gets(ary); if(ary[0]==’*’) {…
Recent Comments