allcoding1
22.5K subscribers
2.19K photos
2 videos
77 files
909 links
Download Telegram
C++
Telegram - @allcoding1
👍4
Python
Telegram - @allcoding1
👍1
Python
Telegram - @allcoding1
👍1
string changeCase(string s, int n)
{
    int n = s.size();
    string ans = "";
    if (n == 1)
    {
        for (int i = 0; i < n; i++)
        {
            int a = 0;
            if (s[i] == ' ')
                a = 1;
            else if (a == 1)
                ans += toupper(s[i]);
            else
                ans += s[i];
        }
    }
    else if (n == 2)
    {
        for (int i = 0; i < n; i++)
        {
            int a = 0;
            if (s[i] == ' ')
                ans += '-';
            else
                ans += s[i];
        }
    }
    else if (n == 3)
    {
        for (int i = 0; i < n; i++)
        {
            int a = 0;
            if (s[i] == ' ')
                ans += '_';
            else
                ans += s[i];
        }
    }
    else if (n == 4)
    {
        ans += toupper(s[0]);
        for (int i = 1; i < n; i++)
        {
            int a = 0;
            if (s[i] == ' ')
                a = 1;
            else if (a == 1)
                ans += toupper(s[i]);
            else
                ans += s[i];
        }
    }
    return ans;
}
C++

Telegram:- @allcoding1
👍5
Code for changeCase question in python 3

Telegram:- @allcoding1
👍5
🎯HCL Technologies Off Campus Freshers Recruitment Hiring For Analyst Role | 4.2 LPA

Job Role Senior analyst
Education B.Tech
Experience 0-2.5 Years
CTC/Salary 4.2 LPA

Apply Now:- http://www.allcoding1.com

Telegram:- @allcoding1
👍5
IBM EXAM ANS 6PM

Telegram:- @allcoding1

Discussion group:- @IBM_exam_Ans
Python

IBM EXAM ANS 6PM

Telegram:- @allcoding1
👍7
Python

IBM EXAM ANS 6PM

Telegram:- @allcoding1
👍3
import java.lang.Math;



class Gfg {



// driver code

public static void main(String args[])

{

// float numbers

float x = 4567.9874f;



// find the closest int for these floats

System.out.println(Math.round(x));



float y = -3421.134f;



// find the closest int for these floats

System.out.println(Math.round(y));



double positiveInfinity = Double.POSITIVE_INFINITY;



// returns the Integer.MAX_VALUE value when

System.out.println(Math.round(positiveInfinity));



}
}

Java

IBM EXAM ANS 6PM

Telegram:- @allcoding1
👍4
x = float(input())
n = int(input())
If n<1 and n>2:
print("Invalid Input")
else:
print(round(x,n))
#Python abridged ans

Telegram:- @allcoding1
👍6👎1
🎯HCL Technologies Off Campus Freshers Recruitment Hiring For Analyst Role | 4.2 LPA

Job Role Senior analyst
Education B.Tech
Experience 0-2.5 Years
CTC/Salary 4.2 LPA

Apply Now:- http://www.allcoding1.com

Telegram:- @allcoding1
👍1
(A)

Deloitte Exam Ans 7pm

Telegram:- @allcoding1
25%

Deloitte Exam Ans 7pm

Telegram:- @allcoding1
9
Deloitte Exam Ans 7pm

Telegram:- @allcoding1_official
1/6

Deloitte Exam Ans 7pm

Telegram:- @allcoding1